Lab Write Up
Name: Arman Williams
Period: 7
Assignment: Lab #2
Lab Overview
This lab focuses on making loops in scratch. It also involved using interactions and broadcasts to create situations where sprites react differently according to the broadcast signal.
HERE.
My Solution
I created a project using loops and costume changes, a project comparing different loops mathmatically that add up to the same result, and a project where a loop sends a sprite infinitely until an event triggers a change in the sprite's coding.
My Pair project
Assignment 1
Assignment 3
Assignment 4
Questions
- What are the types of loops contained in Scrathc? What are the differences?
- There are forever loops, repeated loops, and loops that keep going until a certain event happens.
- 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?
- Probably the loop until a certain event is fulfilled, or you can use forever, and have a broadcast recieve on another part. This is the best because you can set it until whatever you want to happen happens, and you won't have to keep guessing at the timing.
- Does the following loop structure work? Does it make sense? Why or why not?
- The structure works and makes sense. Because it seems as though you want the sprite to say "Forever loop" Once and then repeat forever and Ever!! Forever
- How can sprites "know" when to begin an action? Is there mroe than one way?
- There are multiple ways to get sprites to know when to begin an action. One of them is to use a broadcast, and have other sprites recieve the broadcast. Another way is to have something clicked, or pressed to send a signal.
- Are the following code snippets equivalent? Why or why not?
- The two are the same, because one is just saying if this certain event happens do "A" otherwise do "B" and the other code is the same, but worded differently, as in; If this doesn't happen, do "B" otherwise do "A"