Lab Write Up

Name: Sam Basilico

Period: 7

Assignment: Lab #9

Lab Overview

In this lab, the task was to create a add a list that tracked how many rabbits and foxes there were each second and added it to the list. Then, I had to export three graphs to my website using excel.

My Solution

My solution to this problem was to have each sprite for the rabbit and fox wait a second and then add the variable that knew how many of each was on the current screen to the list. When All of the data was on the list, I exported it to Excel and then from excel you could easily make it a graph. Then for the graph I screenshotted them and then saved those images in my images file in Brackets. Thebn I linked them in my website and as you can see they are here!

Questions

  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?
    • The data that is attatched to each clone is the variable that decides how many there are and other simulation settings.
  2. Are the simulation results the same each time? Why or why not?
    • No because it can vary on how much they reproduce and which number it picks from random for the death rate.

    My Project Link

    Trial 1

    Trial 2

    Trial 3

    Lab Overview

    In this lab, the task was to create a game that resembled the movie Gremlins. In this, your sprite had to move along the x axis and collect falling items and when the item hits, it makes a duplicate and that one bounces off. Also when the item hits the gremlin, the gremlin should shrink. If you miss 10 items, the game is over.

    My Solution

    My solution was for the cloud to bounce off the walls by using the if touching variable in order to sense that it was at a wall and then change direction. For the stars. I had the cloud wait a random amount of seconds and then that is when it would create a clone of the star and then the star is programmed to change in the y axis and fall. when the stars touch the witch, they deleted. When the witch touched the star, it made anither star to make it look liek the star was bouncing off.

    My Project Link