Welcome back, Python learners! 🐍
Ready to test what you’ve learned? After three episodes covering the fundamentals, it’s time to consolidate your knowledge with some hands-on practice.
Before we dive into the exercises, let’s quickly recap the essential concepts you’ve mastered so far.
Quick Recap: The Essentials You Need to Know
🖨️ The Print Function
Definition: A function that displays output on your screen. Always starts with print followed by parentheses.
print(”Hello World”) # Displays: Hello World
📝 Variables & Assignment
Definition: Containers that store values. You assign values using the equal sign =.
my_name = “Alice” # Creates a variable called my_name
age = 25 # Creates a variable called age
🔤 Strings
Definition: Text data wrapped in quotation marks. Can contain letters, numbers, symbols—anything!
greeting = “Hello there!”
empty_string = “”
mixed = “I have 3 cats and 2 dogs”
🔢 Integers
Definition: Whole numbers (positive, negative, or zero) without decimal points.
score = 100
temperature = -5
zero = 0
🔢 Floats
Definition: Numbers with decimal points, used for precise calculations and measurements.
pi = 3.14159
price = 19.99
negative_float = -2.5
🤔 If Statements
Definition: Allow your program to make decisions based on conditions. Use Tab indentation for code blocks.
if *condition*: # do this (remember the Tab!)
elif *another_condition*: # do this instead (Tab again!)
else: # do this as fallback (Tab here too!)
🔄 For Loops
Definition: Repeat code a specific number of times. The variable (like i) holds each value from your sequence.
for i in range(1, 6): # Numbers 1, 2, 3, 4, 5
print(f”Number: {i}”) # Tab indentation + f-string
🔁 While Loops
Definition: Keep repeating code as long as a condition stays true. Make sure the condition eventually becomes false!
counter = 5
while counter > 0: # “Is counter greater than 0?”
print(f”Countdown: {counter}”) # Tab indentation
counter = counter - 1 # Make it smaller each time
🎯 F-strings
Definition: Modern way to insert variables into text. Put f before quotes and use {} around variable names.
name = “Bob”
age = 30
print(f”Hi {name}, you are {age} years old”) # Hi Bob, you are 30 years old
⚖️ Comparison Operators
Definition: Symbols that compare values and return True or False.
==(equal to)!=(not equal to)>(greater than)<(less than)>=(greater than or equal)<=(less than or equal)
🧪 Practice Time: Let’s Code!
Ready to put your skills to the test? I’ve prepared a comprehensive exercise notebook that covers everything we’ve learned so far.
The exercises are organized in progressive levels:
Level 1: Basic variables and printing
Level 2: Making decisions with if/else
Level 3: Mastering loops (for and while)
Level 4: Combining everything together
Bonus Challenge: Advanced weather report project
📥 Get Your Practice Notebook
🔗 👉 https://colab.research.google.com/drive/1NM0LfPo_t5Q58RNQawWNGl9Fn6SBGWU8
This interactive notebook contains:
All exercises with clear instructions
Code cells ready to run
Progressive difficulty levels
Hints and tips for each challenge
Space for your solutions
Simply click the link, save a copy to your Google Drive, and start practicing immediately!
🏆 Solutions & Next Steps
Did you complete all the exercises? Congratulations! You’ve just practiced:
✅ Variable creation and assignment
✅ All three data types (strings, integers, floats)
✅ Conditional logic with if/elif/else
✅ Both types of loops (for and while)
✅ F-string formatting
✅ Comparison operators
What’s Next?
In our next episode, we’ll explore:
Lists and indexing (storing multiple values)
Getting user input (making interactive programs)
Functions (creating reusable code blocks)
💭 How Did You Do?
Programming is like learning a musical instrument—the more you practice, the more natural it becomes. Don’t worry if some exercises felt challenging; that’s completely normal!
Remember: every expert programmer started exactly where you are right now. The key is consistent practice and patience with yourself.
What concept are you finding most challenging? Drop a comment below and let me know what you’d like me to explain more in the next episode!
Keep coding, keep learning, and see you in the next episode! 🚀
P.S. Don’t forget to use # comments in your code to explain what you’re doing. Future you will thank present you!



