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

  Greater

  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 get up to the very top and then go down two steps

  The dog wil move up four steps and then stop

  The dog will move up two steps and then stop

  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

  move 50 steps

  repeat 5

  stop

  turn 50 degrees

 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

  big error / deleted

  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 total should be a+b+c+d

  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 value of b is 9, which is too high