Bodhi Tan's Coding Projects

Hi, I am Bodhi Tan, and I love exploring Python to solve problems and create cool projects. I enjoy using math, loops, and if-else decisions to make my programs work just right!

Portrait of Bodhi Tan

Pygame Project: WhatCountry? (pygame_what_country.py)

Description:

In this project, I created a game called "WhatCountry?" using Pygame. The idea came from my curiosity about the flags of different countries and my love for learning about cultures as a young Singaporean. I wanted to make a game that challenges players to recognize which flag belongs to which country, while also teaching me more about coding and design!

To build this game, I used object-oriented programming (OOP) to organize my code into clear, manageable parts. I created separate classes for the game screen, the flag drawing functions, and even the scoreboard and instructions. It was like building a set of LEGOs—each small block worked on its own, but together they formed a complete and exciting game.

In "WhatCountry?", each turn displays a flag that I draw using simple, solid-color stripes. To make sure even white parts are visible, I outline each flag with a thin black line. I included at least seven different flags, such as those for France, Italy, Germany, Poland, Ukraine, Russia, and Romania. The game then asks a question like, "Is this the flag of France?" If you think the flag is correct, you press Y; if not, you press N. There’s even a timer that adds a bit of excitement, making sure you answer quickly!

Along the way, I learned how to design user interfaces that display important information like scores, turn numbers, and timers. Handling key presses and events taught me how to make the game interactive and responsive. I enjoyed combining coding with creativity, and it was super fun to see my ideas come to life on the screen.

Overall, "WhatCountry?" is not just a quiz about flags—it’s an adventure that takes you around the world and shows you how programming can be both educational and entertaining. I hope you enjoy playing it as much as I enjoyed making it!

Diagram:

Diagram for Pygame WhatCountry? Game

Trinket:

Divisibility Tester (divisibility_tester.py)

Description:

I have built a Python module named **divisibility_tester.py** to check if a user-input number is divisible by both 3 and 5 using floor division and modulo.

Diagram:

Diagram for Divisibility Tester

Trinket:

Digital Root Calculator (digital_root.py)

Description:

This project calculates the digital root of a number using a neat formula. It shows how math can simplify big numbers into one digit and reveal hidden patterns!

Diagram:

Diagram for Digital Root Calculator

Trinket:

Even/Odd Guesser (even_odd_guesser.py)

Description:

In this project, I designed a game where the program checks if a number is even or odd using if-else statements. This project teaches me how to make decisions in code based on conditions.

Diagram:

Diagram for Even/Odd Guesser

Trinket:

Cube Number Puzzle Challenge (cube_number_checker.py)

Description:

In this project, I wrote a program that checks if a number is a perfect cube by calculating its cube root and comparing it to the original number using if-else statements. This shows how decisions in code help solve math puzzles.

Diagram:

Diagram for Cube Number Puzzle Challenge

Trinket:

Blooming Flowers (garden_progression.py)

Description:

In this project, I helped manage a garden by using a for loop to calculate the number of blooming flowers on day 25 and the total after 25 days. This shows how repeating a calculation can predict growth over time.

Diagram:

Diagram for Blooming Flowers

Trinket:

Store Inventory Management System (inventory_progression.py)

Description:

In this project, I managed a store's inventory that increased daily using a for loop. I calculated the number of units on day 15 and the total after 15 days. This is important because it shows how for loops help us perform repetitive tasks easily.

Diagram:

Diagram for Store Inventory Management System

Trinket:

Countdown Timer (my_countdown_timer.py)

Description:

In this project, I built a countdown timer that uses a while loop to count down from a starting number until it reaches 1. This is important because it shows me how to repeat an action until a condition is met.

Diagram:

Diagram for Countdown Timer

Trinket:

Password Security Checker (my_password_checker.py)

Description:

In this project, I created a program that keeps asking for a password until the correct one is entered using a while loop. This project shows how while loops can ensure that an action is repeated until the right condition is reached.

Trinket: