Learn Python – 4.1: Lists – Python’s Shopping Cart of Data

So far, Python has been dealing with one thing at a time. One name.One number.One answer. That’s fine for small programs.But real programs need to remember lots of things. That’s where lists come in. A list is Python saying: “I’ll keep all of these together for you.” What Is a List? A list is a […]
Learn Python – 4.0: Collections – Make Python Remember More Than One Thing

So far, Python has been pretty good at remembering things. A name.A number.A single value stored in a variable. That works… until it doesn’t. Because real programs don’t deal with one thing at a time.They deal with many things. Many names.Many scores.Many items.Many answers. And writing this: name1 = “Alex” name2 = “Sam” name3 = […]
Learn Python – 3.5: Mini-Project – Guess the Number

Your first real loop-powered Python game. You’ve taught Python how to: Make decisions Repeat itself Stop when it’s time Skip things on purpose Loop inside loops That’s more than enough to build something that actually feels like a game. So let’s do exactly that. We’re building Guess the Number: a classic beginner game where Python […]
Learn Python – 3.4: Nested Loops: Loops Inside Loops (Loop-ception!)

When Python Repeats Things Inside Other Repeated Things. Yes, the name sounds intense. Nested loops are exactly what they sound like:a loop inside another loop. Before you panic, this is not as bad as it sounds. You already understand loops.Now we’re just stacking them. The Big Idea (Before Any Code) A nested loop means: “For […]
The 10 Best Birthday Gifts for Programmers They’ll Actually Love

Buying birthday gifts for programmers is… tricky. They already have opinions. Strong ones. About keyboards. About chairs. About tools you didn’t even know existed. And the moment you try to guess something “technical,” you’re one wrong choice away from polite disappointment and a gift receipt. That’s why birthday gifts for programmers work best when they’re […]
Python Code Written at 2 AM

Nothing good happens at night, especially Python code written at 2 AM.And yet, this is when some of the most… creative Python code is born. You didn’t plan to be here. You were just going to fix one small thing. A tiny tweak. Five minutes, tops. And now it’s 2 AM, your brain is running […]
Learn Python – 3.3: Break and Continue – When Enough Is Enough

Teaching Python When to Stop (or Skip Ahead) Loops are powerful. Sometimes too powerful. You’ve already seen that loops can repeat code many times — maybe even forever if you’re not careful.So Python gives you two simple tools to stay in control: break → stop the loop completely continue → skip the current round and […]
Learn Python – 3.2: While Loops – The Persistent One That Never Stops

Teaching Python to Repeat Until Something Changes For loops are polite. You tell them exactly how many times to repeat, and they do it.Five times? Five times.No more. No less. While loops are different. They don’t care about numbers.They care about conditions. A while loop says: “As long as this is true… keep going.” And […]
Learn Python – 3.1: For Loops – The Organized Repeater

Teaching Python How to Repeat Things Without Losing Count Loops are Python’s way of saying: “I’ve got this. Go get a coffee.” And for loops are the most polite, organized version of that. You use a for-loop when you already know how many times something should happen, or when you want to go through a […]
Learn Python – 3.0: Loops – Teaching Python to Repeat Without Complaining

Or: How to Stop Doing the Same Thing Over and Over Up until now, Python has been pretty obedient… but also a bit lazy. If you wanted something to happen five times, you had to write it five times.Ten times? Ten lines.A hundred times? …yeah, no thanks. Real programs don’t work like that. They don’t […]