Scratch Lab #10

Name: Matthew Moorehead

Date: December 10th, 2015

Period: 7

Assignment: Lab #10

Lab Overview

The first assignment that we were supposed to complete for the lab was to remix the predator/prey project created. We were supposed to create two lists within this project and use these lists to track the amount of foxes and rabbits in the simulation. We needed to do this 5 times, and use this data to make three graphs. These graphs were made on excel.

My Solution

To solve this, I first remixed a little of the code so that the information that appeared on the screen would be added onto the lists. I created two lists, rabbits and foxes. Then, I made the info on the screen add to the lists by adding the variables of the animals to the lists. I then made the settings of the simulation and started the simulation 5 times. Then I used the data and added this to the excel program and then made the graphs by doing this. I also changed the names so that the lines were rabbits and foxes on the graphs. Here are the graphs which were produced.

My Project Link

Questions for problem 1

  1. What data is attached to each clone? That is, what is changed on each clone that allows for the rabbits and foxes to appear/disappear?
    • When the clones are introduced into the program, they appear at random locations and face random directions. This makes the location of the clones always different, which is important for the program.
  2. Are the simulation results the same each time? Why or why not?
    • No, they are not the same each time. The data can often vary becuase the simulation settings are not always going to create the same results, but will, for the most part, have similiar trends as the times before.
  3. Post three of the graphs you created

Graph 1

Graph 2

Graph 3

Lab Overview

This problem asked us to create a Gremlins type game where a cloud in the sky would shoot something down and the sprite at the bottom of the screen would scroll using the mouse and then it would duplicate that sprite. The point of the game is to catch as many of the objects that are falling and if 10 of the items fall then the game is over.

My Solution

To solve this, I first created two sprites. Then I added a costume of the baseball into the cloud sprite. After this I made a few variables. Then, I made it so the mouse controlled where the sprite went and also made the cloud move as well. Then, I made the baseballs fall at random times in between a certain set of times. After this, I made it so that it created a clone once the sprite touched the baseball. Then, I made the clone get smaller and move across the screen to the left. I used the variables to keep track of the score and make sure that once 10 of the balls fell, the game ended.

My Project Link