Scratch Lab 2

Name Animation

Lab Overview

This lab required the use of three different costumes on a sprite with my own name.

My Solution

I made a sprite and put my name on it using the text feature. After the sprite was conceived, I made two other costumes and added a story line to the transformations.


Embedded Loop

Lab Overview

This lab analyzed the use of embedded loops, loops within loops, to see how they interacted.

My Solution

I created the embedded loops that were assigned and ran them on my sprite. I found that the first, second, and 4th loops work. When a loop is embedded in another loop, the result is multiplied.


Repeat Until

Lab Overview

This lab required the use of two different sprites and the application of broadcasts, animations, and background changes. Once the first sprite gets triggered via senses, it must broadcast a message that triggers the other sprite to animate.

My Solution

I programmed the penguin and D-Money Hip Hop as my two sprites. The penguin rotated and glided to the edge where it broadcasted the message for D-Money Hip hop to show. D-Money Hip Hop then began to dance while the background and music also changed with the broadcasted message. D-Money had an embedded loop for his dances.

Question 1

The two loops in scratch are the repeat loops, which have a finite amount of repeats, and forever loops, which repeat forever unless you stop the program manually.

Question 2

If I am given an action where I do not know for how long I want to repeat it, I should use a repeat loops with a random number. This will help get the timing down because I can adjust from there while I know the forever loop will continue forever.

Question 3.

The following loop structure will not work and does not make sense. The loop will get stuck in the second loop of saying "forever and ever"an infinite amount of times never looping back.

Question 4

Sprite can know to begin actions through communicating through other sprites with messages, having an action begin from the press of a key, or clicking of the green flag

Question 5

Yes the two code snippets are equivalent. This is because the if then program has the same results in the opposite places, and the if clauses are opposite.