import random
while True:
dice_number = random.randint(1, 6)
print('You rolled ' + str(dice_number))
print("Do you wish to continue? [Y/n]" )
if input() == 'Y' or 'y':
pass
else:
break
我只是浪费了半个小时试图弄清楚这件事,仍然不知道我做错了什么。有人能帮帮我吗?
https://stackoverflow.com/questions/51446396
复制相似问题