Wednesday, July 9, 2014

Day 95

Python at CodeCademy. Worked on Python tutorial 2 of 19, Functions, Function Junction? Created a function, spam, that prints the string "Eggs!" to the console. Don't forget to include a comment of your own choosing (enclose it in triple quotes!).

The code used:
def spam():
    """Prints 'Eggs to the console."""
    print "Eggs!"
    
# Define the spam function above this line.
spam()

The interaction for this code looked like this:
Eggs!

No comments:

Post a Comment