0%

Teh Yi Feng's Coding Projects

Hi, I'm Yi Feng! I enjoy building robots and using coding to solve real-world problems. Starting with block-based coding helped me understand how to control my robots and test new ideas. Later, I wanted to learn something more advanced, so I began using Python. Python showed me how to write my own programs and think in new ways. Combining robotics and Python makes me excited to create projects that can help others and make learning fun. I hope you enjoy seeing what I have built!

Portrait of Teh Yi Feng

Project 1: Touch Sensor Table Tennis Racket

Touch Sensor Table Tennis Racket

I wanted to create a table tennis racket that could be activated by touch sensor. Using the coding concepts of conditionals (if else statements), I created a racket that would swing and hit a ping pong ball when the touch sensor is pressed.

Project 1: Touch Sensor Table Tennis Racket
Project 2: Ultrasonic Sensor Activated Door
Project 2: Ultrasonic Sensor Activated Door

Ultrasonic Sensor Activated Door

Using an ultrasonic sensor, I re-created the door of a shopping center that opens automatically whenever a person is within a specific distance from the door.

Project 3: Color Activated Shooter

Color Activated Shooter

Having played at the arcade frequently, I decided to create a secure and precise shooter that fires a shot whenever the two colour sensors detect 2 specific colours in a coded order using the coding concept of conditional loops.

Project 3: Color Activated Shooter

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:

Leap Year Checker (leap_year.py)

Description:

This program checks if a given year is a leap year by using if-else statements to handle divisibility by 4, 100, and 400. It demonstrates how to make decisions in code based on multiple conditions.

Diagram:

leap_year.png

Trinket:

Count Vowels and Consonants in a String (count_vowels_consonants.py)

Description:

In this project, I used a for loop to count the number of vowels and consonants in a given string. The loop iterates through each character in the string, checking if it is a vowel or consonant, and updates the counts accordingly.

Diagram:

Diagram for Count Vowels and Consonants

Trinket:

Number Pyramid (number_pyramid.py)

Description:

In this project, I created a number pyramid using nested for loops. The outer loop controls the number of rows, while the inner loop prints the numbers in each row. This project demonstrates how to use loops to create patterns and shapes in Python.

Diagram:

Diagram for Number Pyramid

Trinket: