Preview

04 - Scratch IF statements and loops

 1. Why won't this code continuously move the sprite when clicking the directional arrows?
scratch_if_broken_code.png

  Need a 2nd "point in direction" block after "move 1 step"

  The "move 1 steps" commands need to be inside a "forever" block

  The "point in directions" values need to change

  The "if" statements need to be inside a "forever" block

 2. In programming, an if statement allows you to perform a certain action based on a certain __________________

  variable number

  None of the above

  character name

  condition

 3. Repeating a statement more than once is called a

  variable statement

  costume

  selection

  loop

 4. There is an if statement in this block of code. Select which statement from the following options is correct.
scratch_spot_the_condition_if.png

  point in direction' is the condition. If the direction is right, then proceed

  touching paddle' is the condition. If the sprite touches the paddle, then proceed

  None of the above

  move 5 steps' is the condition. Only if this is 'met' will the program continue

 5. Analyse the block of code below. What will it do?
whatwillthisscriptdo.png

  the sprite will stand still and turn orange

  the sprite will continue moving until the sprite touches orange

  The sprite will move forever

  the sprite will only move when it is touching the colour orange

 6. These two commands in programming are also referred to as:
thesetwocommands_scratch.jpg

  objects

  selection

  variable setting

  iteration

 7. What will make the Sprite move 10 steps to the right?
scratch_foreverif.png

  If it touching the mouse

  If it is touching the Edge of the screen

  If it is touching the colour Yellow

  If it is touching the colour pink

 8. What would the Sprite say if the 'Test' variable is set to 10?
scratch_ifstatement_test_10.png

  None of the above

  My name is Bob

  Hello

  I like Chocolate

 9. Move forward __steps; go to x: ___ y: ___; and change x by ___ are all examples of this kind of block

  Looks

  Motion

  Event

  operator

 10. If my grade is less than 50, then I am failing this unit. This is an example of what kind of conditional statement?

  if statement (conditional logic)

  None of the above

  iteration (while logic)

  true/false statement