def isEqual(num1,num2):
if num1<num2:
print(‘小了’)
return False
elif num1>num2:
print(‘大了’)
return False
else:
print(‘答对了’)
return True
from random import randint
num = randint(1,100)
print(‘猜猜看’)
bingo = False
while bingo == False:
answer = int(input())
bingo = isEqual(answer,num)
猜数字的小游戏
最新推荐文章于 2021-07-24 10:40:31 发布