我们将如何使用输入语句的输出,将使用什么来代替命令中的 (is) 和命令中的 birthdayRun
how will we use the output of an input statement , what will be used in place of (is)in the command and birthdayRun in a command
occasionDay = input()
if occasionDay is 'Birthday':
birthdayRun()
#what will be used in place of (is) birthdayRun is a command
您需要将 is
替换为 ==
,它将匹配字符串,如果等于它,则 运行 将 birthdayRun()
occasionDay = input("Enter:") # you can put value you want to display for user
if occasionDay == 'Birthday':
birthdayRun()
occasionDay = input()
if occasionDay is 'Birthday':
birthdayRun()
#what will be used in place of (is) birthdayRun is a command
您需要将 is
替换为 ==
,它将匹配字符串,如果等于它,则 运行 将 birthdayRun()
occasionDay = input("Enter:") # you can put value you want to display for user
if occasionDay == 'Birthday':
birthdayRun()