Category Archives: Homework

Summer Week 1

This week we worked on scaffolding. How to go from an idea to some idea of what the components of the code for a program are going to be. I want us to think in terms of nouns and verbs.

Lets go over the Piggy Game:

Here are some nouns:

Player 1
Total score
Score for a round

Player 2
Total Score
Score For a Round

The idea of a turn (this is an abstract object but is still a noun)

Here are some verbs:
update the total score
update the score for a turn

Now I want you to come up with the nouns and verbs for a video game you would build to draw a Jackson Pollack painting.

Week 6-11/22

I am going to be posting a lot of code over next few day. The best thing to do is to try to understand how each program works before going on to the next one.  Feel free to email me for help.

A. See link :

Try to understand how the code works. Look at the yVolocity variable. See how it changes. Think about why I have a forever loop that is never going to terminate (exit).  Notice what happens when “key a” is pressed.  What happens when “key a” is pressed and then pressed again? Change the initialization of yVolocity from 10 to something else. See if you can write the code so the the butterfly does not go through the block (I will be posting that tomorrow so try to do it yourself before looking at answer).

B See link:

Start the game and then hit the key s.  I used “s” for stop. Try to understand how this works. Look at code from part A and see the changes I made to part B. (Hint: I replaced forever loops with repeat until loops, why?)

C See link

Start the game and jump so that you hit the yellow block.  Notice the bytterfly bounces down. See if you can figure out how the changes to the code made that happen.


D: Notice in the code above when the butterfly jumps and hits its head on the block it bounces down. This is good but it then goes to low. Can you figure out how to make it stop falling so that it stops and is fully in the display?


More to follow in next few days



Week 5 – 11/15

Please used the link below to see the code that we worked on in class



1. Please work on adding new features to your game incorporating some of the ideas we worked on in class.  Some other ideas are to have a sprite’s costume change continually by putting it in a loop. You can also have its size increase and then decrease in a loop to create a nice visual. There are things you can come up with that I have not even thought of.  Be creative!!!! We will share our work at the beginning of next class.

2.  Start to think about how we can make a sprite jump onto a horizontal moving platform and then how to have the sprite move with the platform. Also how to make the sprite fall if it  does not land on the platform.

Week 4 11/8

Below is a link to the work we did in class

1. Change the initial value of step size different values. What happens?

2. Change the initial value of growth rate to different values. What happens?

3. Be creative. You can add lots of things to this game. Use your creativity!!!!!!

4. Look at other game online. Figure out what features you like. If not sure how to program then have link ready so we can look at together in class.

5. Have Fun!!!!!!!!!!!

Week 3 – 11/1

First off want to thank Maddie for the cool Halloween Program. Nice use of the for loop. If someone else wants to share work with the class please send the program to me first and then during break we can all look at it.

As always will post the assignment over the next few days

Problem 1:

Please look at the following link:

Notice I have a variable called doorEvent. Look at the code for the blue door, Then look at the code for the red door. Notice how door event is being updated. Now look at the code for the yellow door notice there is something missing. Add what needs to be added.

Problem 2:

A big part of coding is learning to figure out how someone else’s code works. Look at the code in the link below

Figure out what is does. Figure out how to add it to problem 1 for our game.

A reminder of how the game works:

example 1:
Prize is behind Door A
Player Selects Door B
Then we need to open Door C

example 2:
Prize is behind Door C
Player Selects Door C
Then we need to open Door either A or B


Problem 3:

Given the code for problem 1 and problem 2 and some code that we worked on in class try to see if you can figure out how to make the correct door disappear (open) in our game.

Week 2 – Oct 25th

I will be adding problems over the next few days. I want the class to start working on little bits of code in scratch that will be related to the 3 door game we are going to code.

Feel free to email me with questions and I can probably get back to you by the following morning if not sooner.

Scratch Problems:

Problem 1: In Scratch, make a list with elements A,B,C . Then imagine that a player picked door A and the prize was behind door B. So which door gets opened? Now remove “A” from the list and remove “B” from the list.  Whats left?

Problem 2. In Scratch make a list with elements A,B,C . Then imagine that a player picked door A and the prize was behind door A. Now which door should be opened? Is there a choice? So remove element “A'” from the list.  What do you think is the next line of code?

Python Problems:

I made a post about using an online interpreter for python. Its pretty simple and will allow everyone to run code without dealing with installing etc. So once you get code to work save your code in another file, email or just write down on piece of paper.

Problem 1:

Go to link

In the upper right hand corner is an arrow labeled execute script. Click on this arrow. Do you see where it printed out “Hello World”

Congratulations,  You just ran your first python script!!!!!!! (If there were a fancy Nancy book on coding in Python, Nancy would explain that a script is just a fancy word for a a program or bit of code that you write in python)

Problem 2: Type in the code below

x = 2

if ( x > 9):

    print “yes”


    print  “no”

Then run the script. What happened?

Now change the first line to:


Run the script. What happened?

Can you explain what is going on?







Sharing Work and emailing me (Michael)

Been having some issues finding students work when it is published. If anyone has any ideas please share. So far what is working is for students to publish and then send me the url to the project. That looks something like the below:

The best email address to use for me is

I hope everyone is having fun working on the problems that were posted.


Week 1 – October 18

Problem Set 1

Work Hard. Work together. Its all about learning and having fun!!!!!!
Big Hint: If you see that code is repeated then …..?
Problem 1
Draw an isosceles triangle. (that is a triangle with two sides that are equal).  Depending on the amount of geometry you know will probably influence how you try to do this.
Problem 2
Using as few lines of code as possible have a sprite write the below
Problem 3
Using as few lines of code as possible create a 3 by 3 pattern of squares.Note I am using the letter x below but I want you to use the square like we used in class.
x x x
x x x
x x x
Problem 4
Part of programing is learning how to figure out things on your own. See if you can learn about having different costumes for the sprite then do problem 3 but have the colors of the squares alternate from red to blue. (note I am using x (red) and o (blue) below but you should use the squares like in class).
x o x
o x o
x o x