Lab Write Up

Name: Elijah Levy

Period: 7

Assignment: Lab 7

Lab Overview

This lab focused on blocks

Questions

  1. What are two advantages to using blocks for code repetition?
    • Blocks look cleaner and run more efficiently.
  2. What are parameters?
    • Block-specific variables that are defined when the block is called.
  3. Give an example of a formula that takes at least one parameter.
    • A block that calculates distance requires 4 parameters
  4. Give an example of a situation where no parameters are needed
    • A block that moves a sprite 10 steps
  5. Explain what you think the following program does? How do blocks make this easier to understand? Explain what you would expect within each block.
    • The program takes a list of names and puts them in alpha order. get name gets the next name, insert into list inserts it into the list, reorder list makes sure the list is still alphabetical, continue checks to make sure there is more to be done.