Starter quiz

  • You can use multiple `elif` blocks.
    • True ✓
    • False
  • A program calculates a theme park ticket price by first checking the users age and then checking if it is peak season or not. Which of the following is used in the program?
    • single `if`
    • `if-else`
    • nested `if`s  ✓
    • `while` loop
  • Match the relational operator to it's description.
    • >
      greater than ✓
    • <
      less than ✓
    • !=
      not equal to ✓
    • ==
      equal to ✓
    • <=
      less than or equal to ✓
    • >=
      more than or equal to ✓
  • What will be the output of the following Python code? ```score = 50 if score >= 80: print("Win") elif grade >= 50: print("Try again") else: print("You lose")```
    • Win
    • Try again  ✓
    • You lose
  • Which of the following statements about nested if statements is true?
    • Nested `if` statements allow you to make more complex decisions within your code  ✓
    • You can only have one level of nesting in Python.
    • Nested `if `statements execute all code blocks, regardless of the condition.
    • Indentation is not important when using nested `if` statements.
  • A school organises students based on age. Students 11-16 attend High School, and students 16-18 Sixth Form. Which expression correctly checks if a student's age falls within the High School range?
    • age > 11 and age < 16
    • age >= 11 and age <= 16
    • age > 11 or age < 16  ✓
    • age >= 11 or age <= 16
+