秋已凉 发表于 2021-5-20 03:44:36

得到一个语法错误,我不知道为什么

我已经看了整个代码,看不出出了什么问题。请帮我food = ['donuts', 'pancakes', 'bacon', 'waffles', 'eggs', 'bagels']
score =

print('Please answer each question with "y" for "yes" and "n" for "no".')
user_input = input('Do you like food with holes? ')
user_input2= input('do you like stuff made from animals? ')
user_input3=input('do you like sweets')
user_input4=input(' ')
if user_input == 'y':
score = score + 1
score = score + 1
elif user_input =='n':
score = score-1
score = score-1
if user_input2 == 'y':
score = score + 1
score = score + 1
elif user_input2 == 'n':
score = score-1
score = score-1
if user_input3 == 'y':
score = score + 1
score = score + 1
elif user_input3 == 'n':
score = score-1
score = score-1]

页: [1]
查看完整版本: 得到一个语法错误,我不知道为什么