我想做个游戏。因此,在命名时,我需要帮助,这样一旦玩家说不或其他任何事情,它会要求他们再次输入一个名字。但我似乎找不到办法
input("Disclaimer: To be able to continue through text press Enter")
player_name = input("What's your name? ")
name = input('Do you want to keep the name' + player_name + '? (No or Yes?)')
if name == 'yes' or 'Yes':
input('Ok then ' + player_name + ', Enjoy the game!!!')
input('Weclome ' + player_name + ', to planet')
print ('T')
print ('S')
print ('E')
print ('')
print ('0')
print ('6')
input("")
print ('Here we shall learn many things about our know...')
input("")
print ('SYSTEM MALFUNCTION: Core heating, bifunctional cooler has been dammag g g g g')
input("")
print ('Oh no, there seemes to be a problem, let me see if I ca')
print ('SYSTEM ALERT: Ejecting all passengers!!!')
input("")
print ('Oh no, no, no, no, NO, this is not supposed to happen!')
input("")
print ('(A helmet is put onto your head, it fills with fresh oxygen. The bottom area of the passenger seat opens to the colorful Planet of TSE below you)')
input("")
input(player_name + " Are... Are you there?")
把所有的东西放在
while True:
下,如果他们说不,那么就放continue
进入下一个“迭代”把它放进这样一个循环里
相关问题 更多 >
编程相关推荐