🌦️
STUDENT NOTES · DAY 16 OF 24
Project Day: Weather App 🌦️
Everything you've learned — input, functions, dicts, APIs, error shields — becomes ONE real app today.
1The plan (always plan first!)
1️⃣ Ask the user for a city → 2️⃣ call the weather API → 3️⃣ pull the temperature out of the JSON → 4️⃣ show it beautifully → 5️⃣ survive bad cities and bad WiFi.
🦉
Professor Hoot: Five small steps. Every big app you admire is just small steps in a trench coat.
2The core app
🐍
Py: Look closely — Day 2 input, Day 9 functions, Day 11 dicts, Day 15 API. You already knew all of this!
3Making it crash-proof
🐞
Bugly: A user WILL type "Gothamm". WiFi WILL die mid-request. I'll be waiting… unless you shield it. 😤
4Polish it 💅
5Quick quiz! 🧠
The API returns 404 for "Gothamm". Your app should…
💡 Handle it gracefully: friendly message, another chance. That's what separates apps from scripts.
The temperature lives at data["main"]["temp"]. This means the JSON is…
💡 Nested dicts: open the "main" box, then the "temp" box inside it.
6Your mission 🚀
Mission 1: Build the app in class with the real API key, and check the weather of 3 cities.
Mission 2: Add feels-like temperature and humidity from the same JSON.
Mission 3: Wrap it in while True so it keeps asking until the user types "quit". Show a friend!
Day 16 done — you SHIPPED an app! 🚢
Next: the AI chapters begin — what large language models really are.
Go to Day 17: AI Begins →