Preview

03 - Predicting Outcomes Challenge #2

 1. Analyse the following code. What do you predict will be the output?
x=5
if x is greater than 2:
  print("Greater")
else:
  print("Smaller")

  Smaller

  x

  2

  Greater

 2. The dog at the bottom of the stairs wants to get up to the very top, with the blue dog. Analyse the scratch script. Can you predict what will happen to the dog?
earlyyears_predicttheoutcome1_scratchpicture1.png

  The dog will move up two steps and then stop

  The dog wil move up four steps and then stop

  The dog will get up to the very top and then go down two steps

  The dog will not move

 3. This code instructs the dog to climb the stairs, right to the top. Can you fill in the red blanks?
earlyyears_predicttheoutcome1_scratchpicture2.png

  repeat 5

  turn 50 degrees

  stop

  move 50 steps

 4. Images 1 and 2 achieve the same thing. There is a ________ that can be seen in image 1. The same steps are being _______.
earlyyears_predicttheoutcome1_scratchpicture3.png

  sequence and pattern / repeated

  idea / left out

  loop / ignored

  big error / deleted

 5. Analyse the following code. Can you spot and point out the error?
a=8
b=9
total=a+b+c
print(total)

  The value of b is 9, which is too high

  The value of a cannot be 8

  There is no value for 'c' and yet the total requires it to be there for the sum.

  The total should be a+b+c+d