Oops, try again. Did you delete or rename movies?



Oops, try again.
Did you delete or rename movies?
File "python", line 6
def printmovie:
SyntaxError: invalid syntax

print the key and value

movies = {
    "Monty Python and the Holy Grail": "Great",
    "Monty Python's Life of Brian": "Good",
    "Monty Python's Meaning of Life": "Okay"
def printmovie:
    print movies.each()


have you recently been coding in ruby? the syntax suggest so. First, i don't understand why you use a function, no need, but if you do want to use a function, make sure to use the parentheses:

def example():

.each() doesn't exist in python, in ruby it might, not in python

end also doesn't exist in python.

uhm.. a function only execute when you call it, so you might need to add a function call


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.