Lab Write Up
Name: Sam Basilico
Period: 7
Assignment: Lab #2
Lab Overview
In this lab, I had to figure out which structrue would result in the sprite moving 100 steps. There were four different structures that looked pretty similar.
My Solution
The command that made the sprite move 100 units was the command that started off with one step repeated 10 times, and that whole thing repeated 10 times. Another command that made the sprite move 100 units was just the simple one where it moved 10 steps, and that was repeated 10 times. This happened because 10 x 10 = 100.
Lab Overview
In this lab, the task was to create your own sprite and several different costumes for the sprite. I used the art tools provided by Scratch to make the sprite and the different costumes. You also had to name the sprite your name.
My Solution
My solution to this probelm was to draw 3 different costumes using the art tools. I wanted to make it seem like the sprite was moving so I made his costumes have different arm shapes. So when the program runs, it cycles through the arm movements and kind of looks likes he is waving.
Lab Overview
In this lab, there had to be 2 sprites that moved until a given event. After one sprite moved, it should give off a message that triggers the other sprite to move. You can also switch backgrounds and have the sprites only appear for their animation.
My Solution
My solution was to make one sprite move on a forever loop until it touched the wall. When it touched the wall, it broadcasted something that made the other psrite start to move. When the first sprite touched the wall, it also changed costumes to a blank thing so it showed that nothing was there. I also did the same thing to the second sprite.
Questions
- What types of loops are contained in scratch?
- The loops in scratch are forever loops or loops that will loop for however many times you want it to.
- What is the best loop structure for an action to repeat but you don't know how many times it should loop?
- you should use the loop that ends when you click the sprit so it stops exactly when you want it to.
- Will this structure work?
- This structure cannot work because the sprite cannot say two things at once while this codes for the sprite to be saying multiple things together.
- How can sprites know when to being an action?
- Sprite can know when to start an action many different ways. One can be when one action is over and another way is when the flag/sprite is clicked.
- Are these code snippets equivalent?
- Those code snippets are equivalent because they basically just switched the if/else statement around.