|
我已经看了整个代码,看不出出了什么问题。请帮我- food = ['donuts', 'pancakes', 'bacon', 'waffles', 'eggs', 'bagels']
- score = [0,0,0,0,0,0]
-
- 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[0] = score[0] + 1
- score[5] = score[5] + 1
- elif user_input =='n':
- score[0] = score[0]-1
- score[1] = score[1]-1
- if user_input2 == 'y':
- score[0] = score[0] + 1
- score[5] = score[1] + 1
- elif user_input2 == 'n':
- score[0] = score[0]-1
- score[1] = score[1]-1
- if user_input3 == 'y':
- score[0] = score[0] + 1
- score[5] = score[5] + 1
- elif user_input3 == 'n':
- score[0] = score[0]-1
- score[1] = score[1]-1]
复制代码
|
|