#Write a function called grade_scantron. grade_scantron
#take as input two lists: answers and key. Each list contain
#strings. Each string will be only one letter, a character
#from A to E. grade_scantron should return how many questions
#the student got "right", where a student gets a question
#right if their answer for a problem matches the answer key.
#In other words, if value of the first item in answers matches
#the value of the first item in key, the student gets a point.
#If it does not, the student does not get a point.
#If the lists do not have the same number of items, return
#-1 to indicate that the answer key did not belong to the
#same test as the student's answers.\
#Hint: in the past, lots of people have tried to do this using
#the index() method. That won't work! You'll need to track the
#Write your function here!
if len(key) != len(answers):
for index, item in enumerate(answers):
if(key[index] == answers[index]):
#Below are some lines of code that will test your
#You can change the value of the variable(s) to test your
#function with different inputs.
#If your function works correctly, this will originally
answers = ["A", "B", "B", "A", "D", "E", "B", "A","D"]
key = ["A", "B", "B", "A", "D", "E", "B", "A", "D"]
I keep getting -1 and I don't know why. No matter what I do, I can't get the code to print either -1 (if the lengths don't match) or the amount of correct answers ( if the lengths do match up).