import random
num = random.randint(1,10)
answer = int(input("guess a number:"))
if num == answer:
print('相等')
elif num > answer:
print('赢了')
else:
print('输了')
import random
num = random.randint(1,10)
answer = int(input("guess a number:"))
if num == answer:
print('相等')
elif num > answer:
print('赢了')
else:
print('输了')
本文标题:06-猜数字比较大小
本文链接:https://www.haomeiwen.com/subject/ekxoictx.html
网友评论