设计一个猜数字游戏

def cz():
import random
for i in range(10):
a =int(input("请输入要猜的数字"))
i =random.randint(0,100)
if a>i:
print("太大了,猜小点,再接再励!")
elif a<i:
print ("太小了,猜大点,再接再励!")
else:
print("恭喜你,猜对了!!!")
cz()
posted @ 2021-01-07 10:45  虎彪彪  阅读(159)  评论(0编辑  收藏  举报