Skip to content
KALANBLON
Show contents

Chapter 3 of 6 · 10 min

Quiz: deciding

You can now make your program choose. Let's check that conditions hold no more secrets for you. You need 70% correct answers, and every answer is explained.

Quiz

5 questions · pass mark: 70%

  1. 1.What does this program display?

    One answer

    x = 7
    if x > 10:
        print("big")
    elif x > 5:
        print("medium")
    else:
        print("small")
  2. 2.What is the value of this expression?

    One answer

    (3 > 2) and (5 == 6)
  3. 3.Which expressions are True? (several answers)

    Several answers possible

  4. 4.Fill in the operator to test whether code is 1234.

    Complete the code

    if code ____ 1234:
        print("Unlocked")
  5. 5.This program raises an IndentationError. Why?

    One answer

    if True:
    print("ok")

Your progress is saved on this device. Create a free account to keep your progress on all your devices.