Complete overview of Day 02's class activities and learning materials
Teacher Script: “Before we write code, let’s imagine we are in a fruit shop. One student will be the seller, another will be the buyer.”
Role-Play Example:
Teacher Connect: “Did you notice the key details in this conversation? In Python, we can store all this information in variables, just like the shopkeeper keeps a record.”
Code Example:
fruit_name = "apple"
fruit_color = "red"
quantity_kg = 6
price_rupees = 120.5
healthy = True
Ask Students:
Teacher Script: “These variables belong to different data types. Let’s see.”
| Example values | Data type |
|---|---|
| "apple", "red", "my name is ramesh" | str |
| 12, 18000, -250 | int |
| 120.5, 3.14, -0.5 | float |
| True, False | bool |
Prompt: “Which type is best for the word *red*? What about the price?”
Code Example:
print(type(fruit_name))
print(type(fruit_color))
print(type(quantity_kg))
print(type(price_rupees))
print(type(healthy))
Interactive Question: “Predict first — what do you think `price_rupees` will show? `int` or `float`?”
Code Example:
print(f"Fruit name is {fruit_name}")
print(f"Fruit color is {fruit_color}")
print(f"Quantity in kg is {quantity_kg}")
print(f"Price in rupees is {price_rupees}")
print(f"Is it healthy? {healthy}")
Teacher Prompt: “See how clean this looks! If I remove the `f`, what do you think will happen?”
Students recreate the **apple brochure** in Python. Ask them to change:
Code Example:
x = "120.5"
y = 120.5
Ask Students: “Why is `"120.5"` a string but `120.5` is a float?”
Code Example:
print(f"{fruit_name.upper()} BROCHURE")
print(f"Color: {fruit_color}")
print(f"Quantity: {quantity_kg} kg")
print(f"Price: ₹{price_rupees}")
print(f"Healthy Choice: {healthy}")
Extension Prompt: “Try making the brochure for another fruit, like mango or orange.”
Teacher Script: “Let’s review today’s key ideas. Who can tell me…”
Teacher Script: “Tomorrow (Day 03), we’ll move from storing values to comparing values using operators, and make decisions with `if-else`. For example: *Can you afford to buy the apple with your budget?*”
Before the next class, I will: