This forum is now read-only. Please use our new forums at

Functions Forum

View Course » View Exercise

614 points
Submitted by
almost 3 years ago

I am not too sure what to do?

Can any body help me as I don't know what to do?

-1 votes


You're defining a function called "spam" that will then be called later on in the program. Use the definition syntax described previously.

To get you started, here's what you need:

def spam():

After that, you'll tab over on the next line and start your docstring. This is just a string directly below the line that defines your function name. It's going to be enclosed in triple quotes (and the grader only seems to accept double quotes (") where Python would allow you to choose double quotes or single quotes (').

So, after you put that line above to define the name, go down to the next line. Tab over if the editor doesn't do that automatically for you. Type three quotes to start your doc string. Type a short description of what your function does. Then, go to the next line. You still want to be tabbed over once because you are now ready to type out the code block that will make up the functionality of your function. Then, just input a statement or series statements that will print the string "Eggs!" to the console.

I hope this helps. If not, ask some specific questions so we will know where you are having problems.

741 points
Submitted by
Devon Campbell
over 2 years ago

1 Comment

54d66d0395e378b338005126_210193544 Dark_Dumpling over 2 years ago

It helped me, thank you.