Hi, I am Marshall Teo, 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!
In this exciting project, I created a game called SpeedGrammar using Pygame. In SpeedGrammar, players race against the clock to decide if sentences are grammatically correct. I built the game with different screens and animations, and it taught me so much about object-oriented programming (OOP). I organized my code by creating separate classes for the game screen, the scoreboard, the instructions, and even the countdown timer. It was like building a cool machine where every part worked perfectly together!
Designing the user interface was one of the best parts—placing text, images, and handling key presses made the game interactive and fun. I learned how to use loops to keep the game running until the right answer was given or time ran out, and I used if statements to check whether a sentence was correct. This process taught me how decisions in code work just like choices in a real puzzle.
SpeedGrammar also challenged me to think quickly and work with time. The game speeds up as you progress, so you must pay attention to every word and punctuation mark, just like a true grammar detective! I even added different levels where the difficulty increases, and every correct answer makes the game a bit faster. This project not only improved my coding skills but also made me appreciate the importance of grammar and clear communication.
Overall, working on SpeedGrammar was an awesome adventure that combined logic, creativity, and the thrill of a race against time. I felt like a real game developer, solving puzzles and building a game that helps people learn grammar in a fun and interactive way!
In this project, I used math to change a huge number of minutes into days, hours, and minutes. I used division and remainders to see how many full days there were and what was left over. This is important because it shows how math can help us understand time by breaking it down into parts we can read.
In this project, I learned to use division and remainders to split a dollar into different bills. I figured out how many twenties, tens, fives, and ones make up the total. This is important because it shows how math helps us handle money and make change easily.
In this project, I learned how to convert weight from pounds to kilograms by multiplying by a conversion factor. This is important because it teaches us how to change one unit of measurement to another so we can compare different types of data.
I organized a math competition among my friends, and one of the challenges involved calculating the factorial of a given number. I created a Python script that took a user input and calculated the factorial of the given number.
In this project, I used if-else statements to check if a triangle is right-angled. I asked for three sides, sorted them, and used the Pythagorean theorem to decide if the triangle was right. This is important because if-else lets the program choose different actions based on the input.
In this project, I pretended to run a coffee shop and used a for loop to add a set number of coffee beans each day for 7 days. This is important because for loops help us repeat a task without writing the same code many times.
In this project, I used a for loop to count how many people went to the movies each day for 12 days. I started with a base number and added more every day. This is important because for loops let us do the same calculation over and over quickly.
In this project, I built a guessing game using a while loop that keeps asking for a guess until the answer is right. The game tells me if my guess is too high or too low. This is important because while loops let me repeat actions until a condition is met, which is perfect for games.
In this project, I used a while loop to reverse a word and check if it is a palindrome. The loop goes through every letter until the word is reversed. This is important because while loops let me repeat actions until they’re done, which is useful for checking words.