2. Funtcion Junction


#1



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


Your syntax looks a bit off. Double check your parentheses and colon!


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

print spam = """Eggs!"""




# Define the spam function above this line.
spam(Eggs)


#2

You didn't define a function...

You were also told specifically to leave the line that says spam() alone... you added Eggs.


#3

I don't know what I need to do


#4

@bibleman13 could you help


#5

You need to define a function. The syntax for functions in python is:

def function_name():
    do something

function_name()

Also... if you haven't already, please read all of the instructions for this exercise. It not only explains how to define a function, but also, how to add comments to your code.


#6

@jasminepatterson aquaphonenix has you going in the right direction! Basically for this lesson, you need to do 3 things: 1.) create a function spam, 2.) this function spam must print "Eggs!", and 3.) you must include a comment of your own choosing. Also, don't forget to define the function at the end. So first, lets create the function. As @aquaphoenix17 kindly gave you a basic outline of a function you should be able to do all the above steps. For the comment, I believe you can place it anywhere. I placed mine between my spam function and my print statement.


#7

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