Python - 9

Python - 9: Functions

Functions let you reuse code instead of writing the same thing over and over.

✦ Python Editor
▶ Output

👀 Show Example Solution
def say_hi():
    print("Hi there!")

say_hi()

def favorite_game(game):
    print("My favorite game is " + game)

favorite_game("Minecraft")