Multi line comment in function


#1



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


I think it reads multi line comment as a string in the function


I want to read it as a multi line comment, not a string


# Define your spam function starting on line 5. You
# can leave the code on line 11 alone for now--we'll
# explain it soon!

def spam():
    """ 
    COMMENT
    """
    print "Eggs!"
# Define the spam function above this line.


#2

@arcmaster58068 ,

Technically, it is a string rather than a comment. However, it is exactly what Codecademy wants you to do for this exercise.


#3

But it doesnt work :frowning:


#4

@arcmaster58068 ,

Do you still have this line at the end of your code, which is needed to call the spam function?

spam()

If the function does not get called, it will not execute, and Codecademy will not be happy.


#5

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