1

"""用python设计第一个游戏"""
import random

counts = 5
answer = random.randint(1 , 10)

while counts > 0:
    temp = input("不妨猜一下辛赣现在在心里想的是哪个数字: ")
    guess = int(temp)

    if guess == answer:
        print("你是蛔虫嘛?!")
        print("哼,猜中了也没奖励!")
        break
    else:
        if guess < answer:
            print("小啦")
        else:
            print("大啦")
        counts = counts - 1

print("游戏结束,不玩啦QAQ")

 

posted @ 2023-06-10 18:47  大肠还得配榴莲  阅读(15)  评论(0)    收藏  举报