Writing a def Function
Python-style, dynamic and forgiving.
Functions Bundle Logic
A function packages a piece of work under a name so you can run it whenever you like, instead of repeating code. 🧩
Meet the def Keyword
The def keyword defines a function the Python way: relaxed about types and easy to write while you explore an idea.
def greet():
print("Hello from Mojo")All lessons in this course
- Writing a def Function
- Writing an fn Function
- When to Reach for Each
- Return Types and None