On Day 2, we moved past simple variables and got into control flow—basically teaching code how to make decisions and repeat actions without writing the same lines twice.
1. Making Decisions: If-Else and Match-Case
We covered standard if, elif, and else statements, and then looked at Python 3.10's match-case structure. If you have five different user commands, an if-elif ladder gets messy quickly. Match-case works like a neat switchboard that routes inputs to the right block of code with zero clutter.
2. Loops, Functions, and the Chocolate Question
Next came for-loops (great for stepping through lists) and while-loops (great for keeping an app running until a user types 'quit'). We wrapped our math operations inside clean reusable functions with the 'def' keyword to build a 5-option terminal calculator.
During the lecture, Rashmi threw out a tricky question about while-loop boundary conditions and offered a chocolate to whoever could answer it correctly. I held back at first so other students could try, but when the room went completely silent, she called on me directly. I broke down the logic step by step, which impressed her completely. (Even though I'm still waiting on that chocolate, haha!).
3. The Birthday Webpage Surprise
The most memorable part of the day was finding out it was Rashmi's birthday. Over the lunch break, my friend and I quickly put together a custom web build at hbd.sagarithm.in with animations and a personal birthday wish. When we brought it up on screen in class, she had the biggest smile on her face. Doing quick, thoughtful things like that shows what coding is really about: making people happy.