Scratch Lab 6

Max Speed

Lab Overview

This lab required using conditionals to cap the speed on all the sprrite dancing.

My Solution

I made a variable speed would control the rate of costume change. I then created a variable max speed that would cap the speed using an if else clause. Regardless of how high the speed variable goes, the costume change cannot exceed 1/20th of a second per change.


Etch A Sketch

Lab Overview

This lab asked of me to create an etch a sketch using conditionals.

My Solution

UInitially, I made the sprite put the pen down immediately as it not need to lift it. In a forever loop, I made the sprite continually ask for the space bar, to clear the screen and reset the sprite, and I also had the arrow keys in conditionals that allowed me to move the sprite if they are pressed.


Question 1

An if statement asks for only for an action to be fulfilled, but an if then statement does a separate task if the action is not fulfilled.

Question 2

Yes, you can write the code in a forever loop always moving 10 steps and only have an if then clause if the mouse is at zero to say "my mouse is at zero."

Question 3.

A Junior, Sophomore, or Freshman on the band or soccer team

Question 4

Seniors on the band or soccer team.

Question 5

If the number divided by 3 an integer and the number divdied by 5 is an integer, then it is a multiple of 15