Name: Kelly Yokoi
Period: 7
Assignment: Lab #6
Scratch Lab #6 focused on conditionals in scratch. For problem #1 I had to make an etch a sketch using "if..then" blocks. For Problem #2 I had to make a sprite's costume change and have the program record the fastest rate it changed.
I set the sprite to start at the origin and then put multiple blocks in a forever loop. In this forever loop I put the pen down so the sprite could draw a visible line. Then I had 4 if...then blocks for each arrow key. For each of these conditionals I had them point in the appropriate direction and move ten steps whenever the corresponding arrow key is pressed. Then I used an event tag which made it so if the space key is pressed the sprite would return to the origin and the screen would be cleared.
For Problem #2 I created three sprites: two buttons and a character with multiple costumes. I also made a variable named "speed." For the character I set "speed" to 0.5 and in a forever loop had that be the number of seconds in between each costume change. For the faster button I had it set "speed" to "speed-0.1" so that the time between each costume change would be shorter and the animation would look faster. For the slower button I had it set "speed" to "speed+0.1" so the time between each costume change would be longer and the animation would look slower. To record the maxspeed
What is the difference between and if and and if-else statement?
Is there a simpler way to write the following code? Explain.
Which students are described by the following conditional? “if you are not a Senior and you are on the soccer team or you are in band then…”
If the statement from Question 3 is changed as shown below, who else is included in the condition? “if you are not a Senior OR you are on the soccer team or you are in band then…”
Write the condition for a number being a multiple of 15. (hint: look at the block).