哪位帮忙看看啊
import randomsecret = random,randint(1,10)
print('---------first game----------')
temp = input("猜猜我心里想的什么数字: ")
guess = int(temp)
while guess != secret:
temp = input("哎呀,猜错了!再猜一次吧: ")
guess = int(temp)
if guess == secret:
print("woc,猜对了!!!")
print("哼,猜中了也没有奖励")
else:
if guess > secret:
print("哥们,猜大了")
else:
print("呕吼,猜小了")
print("猜对了,真牛逼,游戏结束了,下次再玩吧~~~")
改了好长时间,,,,,, import random
secret = random.randint(1,10) # 修改
print('---------first game----------')
temp = input("猜猜我心里想的什么数字: ")
guess = int(temp)
while guess != secret:
temp = input("哎呀,猜错了!再猜一次吧: ")
guess = int(temp)
if guess == secret:
print("woc,猜对了!!!")
print("哼,猜中了也没有奖励")
else:
if guess > secret:
print("哥们,猜大了")
else:
print("呕吼,猜小了")
print("猜对了,真牛逼,游戏结束了,下次再玩吧~~~") zltzlt 发表于 2020-8-17 14:32
谢谢昂兄弟,我那个教学视频不太清楚就没看清标点{:10_297:}
页:
[1]