Lab 2

Click HERE to view my Problem #1

Click HERE to view my Problem #3

Click HERE to view my Problem #4

Lab 2 Overview

This was an individual lab. We had to complete 3 out of 5 possible problems in Scratch. I chose problem 1, 3, and 5. For problem 1, we needed to create a sprite containing our name and animate it using multiple costumes. In problem 3, we were asked to try 5 different loop structures on a sprite, and see which ones resulted in the sprite moving 100 steps and why.For my final problem, number 4, I needed to make an animation using 2 sprites. The first sprite was supposed to animate until a certain event, and after that event it was to broadcast a message. When the second sprite recieved this message, it would undergo an animation.

My Solution

For problem 1, I created a sprite that was my name. For this sprite, I made three different cotumes, each one just my name in a different color, black, green, and blue, and each one a different size. When the green flag is clicked, the sprite goes into a forever loop. The black name starts in the top left, then the green name appears in the middle of the screen, and after that the blue name appears in the bottom right of the screen. This animation will go on forever after the gren flag is clicked. For problem 2, I made a sprite udergo each of the 5 animations, and determind which animations made the sprite move 100 steps. The green flag and space key animations are the only 2 that make the sprite move 100 steps. For the 4th problem, I had the first sprite walk acros the screen with a certain backdrop. after the sprite moves 25 steps 15 times, it broadcasts a message and says "Dance!". When the second sprite recieves this message, it appears and changes costumes, the backdrop also switches when the "Dance!" message is broadcasted.

Questions

1) There are 6 loops in scratch, the repeat loop, forever loop, if/then loop, the if/then/else loop, and then the repeat until loop.

2) The best loop do use if you dont know how long something should repeat for is the forever loop because it will never stop until you press the stop sign.

3) The loop structure does work, but Forever loop! will only be seen once, because Forever and Ever!! will be stuck in the forever loop the rest of the time.

4) Sprites know when to begin an action when other sprites broadcast a message, when a certain key is pressed, when the green flag is clicked, when the backdrop switches, when a sprite is clicked, and when the loudness reaches a certain level. There are 6 different ways sprites can know when to perform an animation.

5) The code snippets are equivalent, becasue the spacebar being pressed will reslut in "Spacebar has been pressed" in both, and anything else will result in "next costume" and "wait .2 seconds".

Click HERE to return to homepage.