[项目分享]一个DOS模拟器

2022-6-5 12:24:54 [显示全部楼层]
2768浏览
查看: 2768|回复: 2

[项目分享] 一个DOS模拟器

[复制链接]
回帖奖励 1 创造力 回复本帖可获得 1 创造力奖励! 每人限 1 次(中奖概率 30%)
[ 本帖最后由 RYAN 于 2022-6-5 12:26 编辑 ]\n\nimport time
c = ['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[0]:
        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[1]:
        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[2]:
        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')

RYAN  初级技师
 楼主|

发表于 2022-6-5 12:27:03

快来看,快来看,快来看!
回复

使用道具 举报

D22heqisa5yC  学徒

发表于 2022-6-12 12:54:16

yyds,666
快来看,快来看,快来看
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

为本项目制作心愿单
购买心愿单
心愿单 编辑
[[wsData.name]]

硬件清单

  • [[d.name]]
btnicon
我也要做!
点击进入购买页面
上海智位机器人股份有限公司 沪ICP备09038501号-4

© 2013-2024 Comsenz Inc. Powered by Discuz! X3.4 Licensed

mail