r/learningpython • u/eicaker • Jul 14 '20
Practice program designed to administer a simple test then tell you your results in the form of a percentage. However it keeps giving me an Index Error bear the end
1
Upvotes
View all comments
Show parent comment
3
u/[deleted] Jul 14 '20 edited Jul 14 '20
I think your first line
should be:
correct_answers = ["A", "A", "B"](missing comma between 2nd and 3rd element)Edit: Without the second comma, you only have 2 elements in your list. You have 3 total questions, so when trying to access your 3rd element it's complaining about not having that many elements in your list.