我是一名中学生,我开始学习python中的编码.我一直在看视频教程,但我似乎无法弄清楚如果你键入q如何让游戏退出.在这里我有...
print('How old do you thing Fred the Chicken is?')
number = 17
Quit = q
run = 17
while run:
guess = int(input('Enter What You Think His Age Is....'))
print('How old do you thing Fred the Chicken is?')
number = 17
Quit = 'q'
run = 17
while run:
guess = int(input('Enter What You Think His Age Is....'))
if guess == number:
print('Yes :D That is his age...')
run = False
elif guess < number:
print('No, Guess a little …Run Code Online (Sandbox Code Playgroud)