Scratch Lab 4Quick Costume Change
This lab required using a simple animation with a faster and slower button to pace of the sprites costume changes.
I made a variable costume that I would use in a forever with the wait button. I then programmed the faster and slower buttons to alter the costume variable by .1 and -.1 costumes respectively. .1 costumes felt like an ideal interval for my program because the wait time for seconds is would be too slow with 1 whole second as an interval.
This lab required me making a sprite that asked for a name, grade, activity, and food. The sprite then in turn talked to another sprite about the person he just "met"
I created 4 variables and set them all to the answers of the questions the sprite asked. Then in the conversation with the other sprite, my sprite recited the variables at the appropriate times.
This lab required the finding of a distance formula using 2 points on a euclidian plane.
I programmed my sprite to ask for 4 variables, x1, x2, y1, y2. Then my sprite used the answers and made them variables. I then used the subtraction, multiplication, and sqrt operations to correctly plug in the distance formula. My sprite would then in turn say the final distance calculated.
The variables in scratch are different then the variables in math class because we do not solve for them, their values can change, and we should know their values at all times.
The variable can be applied to either all sprites or one sprite specifically.
A variable can only hold one value at a time.
This doesn't work because value 2 cannot hold 2 values at the same time and it would just result in the same value for both.
This is a successful code swap. The temp is changed to value 1, thus storing its data. Value 1 then becomes what value two is, and then value two becomes temp which is what value one used to be.