Skip to content
← Python for AI/ML · all 50 levels

Functions

Level 33 of 50 · Functions

Level 33 of 50

Functions

explained with Eid wishes. Watch the reel, then work through it below: run the code, take the quiz, keep the cheat sheet.

📒 Open the cheat sheet
SanaEid Mubarak to 50 relatives! I'm typing the same thing ALL day!
TeacherWrite it once, use it forever! That's a function!
eid.py
def wish():
    print("Eid Mubarak!")

wish()
wish()
Teacherdef, a name, brackets, colon. Then call it by name!
SanaWhy didn't the def line print anything?
Teacherdef only SAVES the recipe! The call is what RUNS it!

⏸ Pause & predict: what prints?

def roti():
    print("Roti ready!")

print("Start")

Where this leads

Python is step one. Building AI that ships is the rest.

The diploma takes you from zero to deployed computer vision, LLM and agent projects, with engineers who build them for a living. Already code? The bootcamp does it in three months.