Need help with taking a vaction 1


#1


https://www.codecademy.com/courses/python-beginner-P5YtY/0/1?curriculum_id=4f89dab3d788890003000096

File "python", line 1
answer(False):
^
SyntaxError: invalid syntax

I expected there to be no error. What is wrong?


answer():
    return 42

https://www.codecademy.com/courses/python-beginner-P5YtY/0/1?curriculum_id=4f89dab3d788890003000096


#2

the error message:

File "python", line 1
answer(False):
^

doesn't match with your code, to declare a function (definition) we need the def keyword


#3

Thanks! Helps a lot!


#4

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