Day 5 of 30Python Foundations
⌨️Input & Interaction
🎯 Today's objective
Make programs that talk with the user.
📖 Key concepts
- input() reads text from the user
- input() always returns a str
- Convert with int()/float()
- Build a simple conversation loop
💻 Try this code
name = input("What's your name? ")
age = int(input("Your age? "))
print(f"Hi {name}! Next year you'll be {age + 1}.")👥 Learn it your way
🧒 Young Explorers
Now your program can ask questions and react — like a tiny chatbot!
Your task
Make a "robot friend" that asks your name and mood and replies kindly.
💼 Professionals
Always validate/convert input; raw input() is a common source of bugs.
Your task
Ask for two numbers and print their sum — handle the int() conversion explicitly.
🤖 AI connection
Chatbots and assistants are input → process → output loops. You’re building the exact skeleton an AI assistant wraps a model around.
✅ Quick check
What type does input() return?
Always a string (str).
How do you turn "42" into a number?
int("42")