我不知道该怎么办。仅第一个打印语句有效。
#Imports#
import turtle
def Draw():
#Theres supposed to be a turtle drawing here#
def Step_1():
#Show "My Favorite Food"
print ("My Favorite Food: 1- Description; 2- Picture; 3-Exit")
def Step_2():
#Prompt Input#
UserChoise = str(input("Please choose an option (1,2,3):")
if UserChoise == 1:
print ("The History of this food.")
elif UserChoise == 2:
return Draw()
elif UserChoise == 3:
print ("Good Bye.")
sys.exit()
else:
print ("Invalid Input")
Step_1()
Step_2()
我只希望它打印这些语句。另外,如果UserChoise等于3,则应退出程序
答案 0 :(得分:1)
好像您在以下结尾缺少括号:
UserChoise = str(input("Please choose an option (1,2,3):")