Programming Projects

HTML

On the first day of this class, we learned how to create an HTML. This would be used to complete our web page, which is what you are viewing right now.

Logo:

Logo is a programming language that is widely known for its turtle graphics. This is where robots called turtles are able to be commanded to make lines. We used turtle graphics in class to make cool designs. Here's an example of one of them:

This is a picture of a wheel design we created. We did this by controlling the turtles using this function:

Recursion

We also learned about recursion. Recursion is when a command is repeated over and over to make a design. We used this to make our "trees." If you look closely at the picture below, you can see that recursion was used because the tree is made up of "Y" shapes.

This is the function we used to create our trees:


Programming Tools

Loops

Loops are used when you want to make something repeat over and over again.


Variables

Variables were used when we needed to count something. We used it to track the amount of turtles on our screens and also to change side length values.


Conditionals

Conditionals are statements that use the word "if". We used them to separate certain turtles from others using their characteristics. Here is one of the functions that I used the word "if" in:


As you can see, by saying if, I could make it so that a turtle with a certain characteristic would do a certain command. In this picture, the characteristic was having 0 energy level, and the command was for the turtles to die.

Functions

We used functions to order our codes so that they would work. This is an example of a code we used to make a square:


Once we had a square, we used its function in another function that I called a spiral. Its function looked like this:


Comments

Comments were used in this process to help leave reminders just in case we forgot what a function did. Comments were left by using two semicolons to separate it from the function. Example (highlighted):

Turtle Simulation

We made a turtle simulation that allowed turtles to eat, reproduce, obtain, and lose energy. This is the code I made and what the simulation looked like when running:

Python

We also worked with python. This is shown on my Circuits Page, which is linked here:

Circuits


Some other cool logo pictures:

Table of Contents

Home

Programming Projects

Computer Hardware

Circuits

Robotics

Game Programming

3D Graphics

A.I. Page

A.I. Games

Advanced Programming