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")

  Greater

  Smaller

  2

  x

 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 will not move

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

  The dog wil move up four steps and then stop

 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

  turn 50 degrees

  stop

  move 50 steps

  repeat 5

 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

  big error / deleted

  sequence and pattern / repeated

  loop / ignored

  idea / left out

 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 a cannot be 8

  The value of b is 9, which is too high

  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