Sean's Scratch Lab #2

Name:Sean Ahmed

Period: 7

Assignment: Scratch Lab #2

Lab Overview

This is my second Scratch lab where we started using the repeat and forever command.

My Solution

My Project Link

My Project Link

My Project Link

Questions

  1. What are the types of loops contained in Scratch? What are the differences?
    • The types of loops are repeat, forever, and repeat until
  2. If you are given a situation where you want an action to repeat, but you don’t know how long it should repeat for, which loop is the best structure to use? Why?
    • Use the repeat until comand so the loop will end when a command is given.
  3. Does the following loop structure work? Does it make sense? Why or why not?
    • it works but it doesn't make sense to put in two forever loops as one will do the same thing.
  4. How can sprites “know” when to begin an action? Is there more than one way?
    • You can use the wait command or if there is another sprite it can broadcast a message triggering the other sprite(s)
  5. Are the following code snippets equivalent? Why or why not?
    • yes they will both do the same command if the space is pressed and the same one if it's not pressed