Hi, I have been learning Python and have a quick dictionary question.
I am trying to make a "vocabulary test" to help myself study, and am trying to do it with a dictionary. So far I have this:
testwords = {"uno":"one","dos":"two","tres":"three","cuatro":"four",\
"cinco":"five"}
def vocabtest():
for value in testwords:
print "What word does the following definition correspond with?"
print value
answer = raw_input("> ")
if answer == :
print "Correct!"
vocabtest()
I need help with line 9, "if answer == :".
I am not sure how I would check to see if the user's answer is equal to the corresponding key.
Any help would be greatly appreciated. Thanks.