The programming assignments of Will S. On thursday, we used Netlogo to make graphic designs and find prime numbers.

Some code for graphic designs.

Simple program we wrote in Netlogo to check whether a number is prime or not.

On friday, we did lots of programming projects. Here is a file with all of the projects I did on friday.

We wrote a program that checked whether a given input was divisible by three or not.

We wrote a program that iterated through every positive integer below a positive integer given as input.

We wrote a program that drew a square of side length "side" (a variable).

We wrote a program that drew this flower with turtles.

Back to index.

Python

Today we learned python. Python is a very high level and readable language. Our first python exercise was to create a game where the user has to guess a randomly generated integer between 1 and 100 inclusive. It took a lot of debugging, but I finally got my version of the game to work. Here is a picture of the code and a link to the code. My random number game.

Today we learned more python. We imported turtles into our game, and then we used them to make stars and fractals of stars. Mr. Farrell showed us a cool way to make a koch snowflake using recursion. Here are pictures of the code and what the code managed to draw. The turtle code.

Back to index.