Return to Scratch

Scratch Lab 9

Name: Miles Wiesenthal

Period: 7

Assignment: Lab #9

Lab Overview

This lab focused on lists. Using our previous scratch knowledge, we learned how to compact and organize variables using lists. We also learned how to store and cycle through large amounts of data. There was only one out of two programs we had to make. I created a code that took in a set number of integers, then determined which ones were odd, and which were even. Afterwards I added some bits and bobs, like a talking animation and costume change.

My Solution

To take in the numbers, I repeated the code to ask the user for a number, and then systematically add it to a list. Afterwards, I made a block to filter through the list, and find whether they were even or odd by determining the remainder of it when divided by two. I then told this to the player. To make a talking animation, I edited the sprite for a open-mouthed costume. Then i had it switch in between whenever the guy was talking.

Problem #1

Questions

  1. The length of an empty list is zero.
  2. Lists are more powerful that variables because they can be manipulated en masse, they can store larger amounts of data, and can be used to create, remove, and gather specific amounts of variables systematically.
  3. A list can contain different data types.