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

input()

Level 6 of 50 · Basics

Level 6 of 50

input()

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

📒 Open the cheat sheet
SanaMy cousin's wedding! The RSVP app asks how many guests are coming.
TeacherYour code can ask questions too! With input()!
rsvp.py
name = input("Name? ")
print("Welcome", name)
Teacherinput() waits for the user to type. Their answer goes into the box!
SanaWait, does input give a number, or text?
TeacherALWAYS text! Even when they type a number. So wrap it in int()!
rsvp.py
guests = input("Guests? ")
print(int(guests) + 2)
Teacher50 guests + 2 surprise cousins = 52!

⏸ Pause & predict: what prints?

n = input("Guests? ")
print(n + 2)

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.