Posts

Learn Python in 30 Days — Day 28: Final Project Planning (Part 1)

Image
Day 28: Final Project Planning (Part 1) Welcome to  Day 28  of the  Learn Python in 30 Days  series! For the final 3 days of the learn python in 30 days series, we’re creating something far bigger than a simple text adventure, you’re building the foundations of a full open-world RPG, complete with: Multiple explorable regions Villages and interiors NPCs with races (human/elf/dwarf) Enemy creatures Gold, XP, magic, items Ownership (houses, shops) A tile-based world made of 5 separate 10×10 maps Player movement across a grid-based overworld Travel between maps via edges (north → new region, etc.) A world you can continue expanding long after Day 30 This is the world-building day, your job is to create the engine, the data, and the structure that will support the next two days of map logic, combat, quests, shops, and saving/loading. All example files for this series are available on my  GitHub: Learn-Python-in-30-Days By the end of today you will have:...

Learn Python in 30 Days — Day 27: Mini Project – Rock Paper Scissors

Image
Day 27: Mini Project – Rock Paper Scissors Welcome to  Day 27  of the  Learn Python in 30 Days  series! Today we’re building your first complete interactive game using everything you’ve learned so far in this series. Rock Paper Scissors is the perfect mini-project: small, fun, and a brilliant way to combine variables, loops, functions, conditionals, modules, error handling, user input, and even debugging skills from Day 26. By the end of this lesson, you’ll have a polished console game that feels like a “real program”, and a foundation you can expand later (score tracking, classes, JSON saving, etc.). All example files for this series are available on my  GitHub: Learn-Python-in-30-Days Rock Paper Scissors Here is a complete, clean, commented version of the game that uses everything you’ve learned so far. rock_paper_scissors.py import random # Day 19 - modules VALID_CHOICES = [ "rock" , "paper" , "scissors" ] def get_player_choice (): ...

Learn Python in 30 Days — Day 26: Testing & Debugging

Image
Day 26: Testing & Debugging Welcome to  Day 26  of the  Learn Python in 30 Days  series! By this point in the series, you’ve written loops, functions, files, classes, and even started structuring real programs. Today is about something every programmer does, debugging. Debugging isn’t a punishment or a sign you “broke it.” It’s simply the process of understanding your code’s behaviour. In fact, if you work on real projects , debugging becomes one of your greatest skills. Hopefully I can show you some basic methods of debugging to get you started. All example files for this series are available on my  GitHub: Learn-Python-in-30-Days Print Debugging The simplest, fastest, most reliable debugging tool is  print () Print debugging is just checking what your variables contain at different points. Example: Something isn’t adding up def total_price ( prices ): total = 0 for p in prices: total += p return total items = [ "4...