猫史档案馆


口算达人编程

用户:mwh3961mwh3961查看:0 回复:0 评论:0 创建时间:2020-09-12T13:55:29


------------------------------------------防喵线--------------------------------

亿话不说,上代码:

import random


elastic = 0
List = 0
while (elastic < 10):
    elastic += 1
    Dict, a = random.randint(1, 100), random.randint(1, 100)
    if (Dict is random.randint(1, 9)):
        if (Dict < a):
            if (int(input((((str(a) + '-') + str(Dict)) + '='))) == a - Dict):
                print('对')
                List += 10
            else:
                print('错')
        else:
            if (int(input(((str(Dict) + ('-' + str(a))) + '='))) == Dict - a):
                print('对')
                List += 10
            else:
                print('错')
    else:
        if (int(input(((str(a) + ('+' + str(Dict))) + '='))) == a + Dict):
            print('对')
            List += 10
        else:
            print('错')
print('得分:', List)


回复

上一页1 页 / 共 0下一页