2021-06-18
用python IDE设计第一个小游戏
猜一下我现在想的数字一个数字
规则:①你一共有三次机会,直到才对为止
②1-10之间的整数
"""用python设计第一个游戏"""
import random
count = 3
answer = random.randint(1,10)
while count > 0:
temp = input("猜一下我现在想的数字一个数字:")
guess = int(temp)
if guess == answer
原创
2021-06-18 16:20:36 ·
149 阅读 ·
0 评论