Lesson 11: Create Functions

Functions are custom commands. Instead of repeating code, we give it a name.

Defining a function

Use def. Remember to indent!

def greet(name): print("Hi " + name)

Your Objective

Create a function that doubles a number.

main.py
Initializing Python Environment...