Python 3.4 - Return Values

You can make a function and use inputs and do things with it and return a value. These are called return values. There are simple functions that do something once they are run. You can use functions and import them from saved py pages to use on your website.

def happyBirthdayEmily():
    print("Happy Birthday to you!")
    print("Happy Birthday to you!")
    print("Happy Birthday, dear Emily.")
    print("Happy Birthday to you!")

happyBirthdayEmily()

Running happyBirthdayEmily will simply print the statements listed.

def lizzy(x, y):
    total = x + y
    return total

calling the function lizzy from the saved file can draw on the function and use it for whatever prupose

https://www.youtube.com/watch?v=xRIzPZlei9I

Comments

Popular posts from this blog

Pyhton 3.4 - Continue

Conversations Ongoing: Valuing Modernization in Early European History

Conversations Ongoing: A Bunch of Amateurs