我只是不知道如何做一个循环,谢谢你的帮助。你知道吗
from random import randint
print ('Bem vindo!')
random = randint(1, 100)
escolha = 0
reiniciar = 0
while escolha!= random:
escolha = int(input ('Escolha entre 1 e 100: '))
if escolha == random:
print ('Venceste!')
else:
if escolha > random:
print ('Alto')
else:
print ('Baixo')
print ('Fim do jogo!')
欢迎使用StackOverflow。你知道吗
所以你想为你的游戏创建一个CLI,对吗?尝试使用while和input函数,并始终尝试以用户的身份进行思考。有时他并不像我们期望的那样。你知道吗
巴西索达岛!!!!你知道吗
我不懂语言,但我认为你需要改变你的逻辑能力:
相关问题 更多 >
编程相关推荐