Portfolio

A compilation of all my programming projects; including code and working examples, from throughout the year.

Text-Based Python Projects

Trivia Quiz

This program uses variables, conditions and raw input to create an interactive, 10-question text-based quiz.

View Project

Mad Libs Nursery Rhyme

Adding a twist to a familiar nursery rhyme, raw input from the user is stored in variables and used to replace certain words through print-statement concatenation.

View Project

Virtual Restaurant Menu

A fantastical representation of a restaurant order is created with a while loop and user raw input to record the type of food ordered. When the user decides to end their order, the program stops the while loop and automatically calculates the total price.

View Project

Guess the Number

After a random number between 1 and 500 is generated by the program using the randint() function of Python's random library, the user will be given 15 attempts to guess what the number is by typing in raw input. The program will give feedback after each attempt on whether the guess is greater or less than the answer.

View Project

Rock-Paper-Scissors

This program is a recreation of the game Rock-Paper-Scissors in Python. Here, the user plays against the program, which selects its moves from a predefined list containing the three moves using random.choice(). The user chooses his/her desired move by typing in raw input, and every possible outcome is covered by a series of if/elif/else condition statements.

View Project

Five-Move Rock-Paper-Scissors

This program simply adds two more options to the previous Rock-Paper-Scissors program, for a total of five rather than three different moves. The existing set of condition statements is expanded to cover the new outcomes.

View Project

Container Volume Calculator

A calculator program that uses user raw input to calculate the volume of several predetermined 3D solids based on dimensions the user inputs. This program extensively uses the 'def' statement and custom-defined functions to contain actions that are performed repeatedly throughout the program.

View Project

Sum My List

A program that automatically calculates the sum of a list of numbers inputted by the user.

View Project

Twenty Questions

A "can you guess the answer" game is created through the use of nested condition statements.

View Project

Choose Your Adventure

A text-based adventure game, this program is essentially an expansion of the previous 'Twenty Questions' program, utilizing a similar but significantly larger and more complex set of nested condition statements to form several diverging story plots bases on the user's choices.

View Project

Python Turtle Projects - Line Drawings

Honeycomb

Using the 'turtle' graphics library of Python and 'for' loops, this program draws a simple 2D array of seven hexagons in a honeycomb arrangement.

View Project

Mandala

Python turtle and 'for' loops are used to draw a highly intricate line drawing of a mandala.

View Project

Turtle Spiral

'for' loops, the 'random' library and the turtle.stamp() function are used to create a spiral composed of numerous multicolored turtles.

View Project

Octagon Flower

With the addition of the .begin_fill() and .end_fill() functions of the 'turtle' library to fill in a turtle drawing with solid color, turtles are used to draw a ring composed of eight overlapping, multicolored octagons.

View Project

Cone

This program creates a line drawing of a cone using Python turtle.

View Project

Hexagonal Prism

This program creates a line drawing of a hexagonal prism using Python turtle.

View Project

Fading Spiral

'for' loops and variables are used to draw a square with a gradient color effect.

View Project

Thanksgiving Art

Using a complex series of turtle functions, this program creates a complex Thanksgiving-themed image.

View Project

Turtle Shuffle

Using lists and custom-defined functions, this program calculates the coordinate positions of two turtles from a square array of eight turtles and swaps their positions.

View Project

Python Turtle Projects - Pixel Art

Pixel Function

By utilizing Python turtles to draw equal-sized squares, this program; with the help of a number of custom-defined functions to simplify repetitive actions, draws an elaborate pixel art image.

View Project

Intricate Pixel Art

This program greatly simplifies the process of drawing pixel art with turtles, condensing the entire drawing functionality into a single custom-defined function responsible for drawing individual rows. Two lists of values; serving as parameters for each row function, determine the color and location of specific pixels.

View Project

Python Processing Package Projects

Three Bouncing Balls

This program uses Python's processing package to create a continuously running loop. Dictionaries are also utilized to store the values and coordinates of each of the three balls, which are updated after every iteration of the loop to make them move around the canvas and bounce off its edges.

View Project

Ball Trace

Derived from the previous 'Three Bouncing Balls' program, the canvas no longer redraws each frame, making the ball now appear to trace its path with past images of itself.

View Project

Random Ball Path

This program is similar to the 'Ball Trace' program, except now, the ball's x and y velocity will each reset to random values rather than simply reverse with each bounce, making it have an irregular path.

View Project

Racquetball Game

The processing loop introduced in the last few projects is now expanded into a functional game loop, which also introduces a keyboard-controlled paddle and a scoring system to create this simple racquetball game.

View Project

Pong

This recreation of the classic Pong video game in Python simply expands the racquetball program to add a second paddle and scoring system, as well as an upper limit of 11 points which determines the winner.

View Project

Brick Breaker Game

An even further expansion of the racquetball program, this program introduces stationary bricks that disappear and yield points when hit by the ball. This array of bricks is generated by a loop-based algorithm before the game starts. A limited number of lives is also introduced.

View Project

Multi-Level Brick Breaker Game

This program builds on the Brick Breaker program by adding four additional levels that must be beaten before winning the game. The layout of all levels are each generated by an algorithm just before the game starts.

View Project

Maze Game

The Python Processing Package's game loop is now utilized to create this tile-based game that involves the player navigating through the maze. The maze layout is predetermined beforehand by a two-dimansional array and certain tiles have varying effects on the player. A timer is also introduced.

View Project