一个DOS模拟器
[ 本帖最后由 RYAN 于 2022-6-5 12:26 编辑 ]\n\nimport timec = ['POS' , '附件']
fj = ['Calculator' , 'dog zero calculation' , 'Judge Leap Year']
print('Welcome to this operating system')
time.sleep(4)
print('Appendices:Calculator, dog zero calculation, Judge Leap Year')
while 1:
ram = input('>>>')
if ram == fj:
a = input('Enter A to power, enter B to close the calculator, enter C to multiply:')
if a != 'A' and a != 'C' and a != 'B':
print('TAT\n Invalid input \nTAT')
elif a == 'A' :
a = float(input('Please enter the first number:'))
b = float(input('Please enter the second number:'))
c = a**b
c = str(c)
print('Equal to'+c)
elif a == 'C' :
a = float(input('Please enter the first number:'))
b = float(input('Please enter the second number:'))
print('Equal to' , a*b)
else:
print('out')
break
elif ram == fj:
j = int(input('How old is the dog:'))
if j <= 0 :
print('That’s not possible')
elif j == 1 :
print('The equivalent of 14 years old')
elif j == 2 :
print('The equivalent of 22 years old')
else:
h = (j+22)*2
print('The equivalent of' , h , 'years old')
elif ram == fj:
n = int(input('Please enter a year:'))
if n % 4 == 0 and n % 100 != 0 or n % 400 == 0:
print('{0}year, is a leap year.'.format(n))
else:
print('{0}year, not leap year.'.format(n))
else:
print('Invalid input') 快来看,快来看,快来看! yyds,666
快来看,快来看,快来看
页:
[1]