Programming Page

Programming

Home

NetLogo

First to get you started, you need to have NetLogo or you can just go download it.

In this picture, you can see a green arrow, that is called a turtle. Today we learned about turtles.

With the turtles we were able to make a square!!

This is the formula to make a square with the turtles.

This is a pentagon! We also made these by using turtles!

The formula to make a pentagon is right here.

We also made a shape of a triangle using turtles!

This is the formula for making a triangle.

This is a circle that we made using turtles!

This is the formula to make a circle with the turtles.

Our next challenge was to make a quarter circle.

This is the formula for a quarter circle.

Since we were able to do a quarter circle, we now had to make a petal.

This is our formula for making a petal.

Now, since we can make a petal, we should be able to make a flower head.

This is the formula to make a flower head.

If you can make a petal and flower head, now you can make a flower like we did!

This is the formula to make a flower.



Turtles programming was rather difficult because you had to do all these steps and try so many times but it was fun too, you got to play and show off what type of shape you can make with your turtles.

Using Python

We started learning how to use python! Here's our steps!

This is how we started our script, first above everything else, you want to put "from turtle import *" (Don't put the quotation marks.) This is the square we made using python.

This is the formula we used for making a square in python!

We also made this star using python!!

This is our python star formula!






We can make all these other stars! You want to define a new star and call it "star2"



This is the formula for "star2." If you want to the stars like the ones above, what you want to do is keep the length the same but changed the level. The highlighted part in the picture above is the level for the star.

Now we started making a guessing game! We started of the game by letting you tell us your name and then start guessing!

We're using the "while" command and telling the computer what to say when the person gets it right.

We made the computer tell you if the the number was going to be higher or lower from the number you have guessed.

This is how the game should end out if you did all the steps correctly! It even tells you its is lower or higher and tells you when you get it right!

If you have guessed all the amount of times you get to guess, the computer will give you the answer.


Microcolony simulation

Using a Logo programming Language and the NetLogo application, I created a colony of turtles that can move, eat, reproduce and die.