Lab #6 Write Up

Name: Adam Coate

Period: 7

Assignment: Lab #6

Lab Overview

Problem #1: In problem 1 we had to create a sprite that the user could control with the arrow keys. To do this I used if then blocks to to check if the user is pressing any of the arrow keys.

Problem #2: This problem required me to make a sprite that changed costmes faster or slower depending on which button was pressed. It also wanted me to be able o track the maxSpeed. o to this I made a block that would forever check if speed was less than maxSpeed. (since speep represents time between costume switches) If maxSpeed was greater than speed it would set maxSpeed to speed.

Problem #1

Problem #2

Questions

Question #1: The main difference is that the "if" statement only requires one thing to be true, and the "and if" statement requires multiple things to be true to be true.

Question #2: Yes, you can just combine it into move 10 steps becaue ether way the code will result in it moving 10 steps. .

Question #3: This conditional represents students who are not Seniors and are either on the soccer team on in the band.

Question #4: When you change it it include all people that are not seniors and any senior who is on the soccer team or in band.

Question #5: If a number is 1, 3, 5, or 15 then it is a multiple of 15.