Day 7 Unit 1
Unit 1. Bug competition!
WOMEN IN TECH SPOTLIGHT!
Today we will start the day by continuing with “Squash the bug!” game we were working on yesterday. But, before we continue with the bug game, we will have another short women in tech spotlight.
Learning and enjoying how to code doesn’t always mean that you will grow up to be a computer scientist. Because computers are used almost everywhere, you can use your computing skills and do many different jobs. By combining coding with your passion, whether that’s science, politics, sports, arts or anything else, you will have more tools at your disposal compared to someone without a coding background.
Now let’s continue with our game to squash the bugs. As we said yesterday, for natural selection to occur we need “variation” and “differential survival or reproduction”. We are going to introduce those elements to the game today.
If your game didn’t save properly or you want to start where we left off yesterday, this starter project has all the code from yesterday:
https://scratch.mit.edu/projects/317381247
Step 5:
A new type of beetle is in town!
Let’s create a cousin of our large beetles, called the small beetles. Duplicate your LargeBeetle sprite by right clicking on it and selecting “duplicate.” Rename your new sprite “SmallBeetle” and change the size of it so it really is a smaller. Then go to the costumes tab and change the colors of your new sprite to something unique!
Step 6:
Keeping track of small beetles!
Similar to step 3, we want to be sure to keep track of our small beetles too. Alter your code for the SmallBeetle sprite to use the “small beetles” variable instead of the “large beetles” variable.
Now it’s time to play the game!
Start playing your game and notice whether it’s easier to squish the small beetles or the large beetles. What happens to the numbers of small and large beetles as you continue playing the game? Which group do you think has a higher fitness or, in other words, is better able to avoid your squishing?
How do you think this population would evolve based on your findings?
What is the “variation” in our game?
How is the “variation” linked with differential survival and reproduction?