Starter quiz

  • What is the term for repeating a sequence of instructions multiple times in a program?
    • selection
    • iteration  ✓
    • condition
    • randomisation
  • In Python, which code is used to create a loop that repeats as long as a condition is True?
    • `if`
    • `for`
    • `while`  ✓
    • `else`
  • What operator should be added to the gap to make the while loop run whilst the name entered is not equal to Sam? ```while name {operator here} "Sam":```
    • ==
    • =
    • !=  ✓
    • >=
  • What is the primary purpose of a flag in programming?
    • to store a numerical value
    • to indicate whether a specific condition has been met  ✓
    • to perform mathematical calculations
    • to display output on the screen.
  • In a game, a player earns bonuses for collecting a certain number of coins. Which of the following would most likely cause a flag named bonus_earned to be set to True?
    • The player loses a life.
    • The player collects a set number of coins.  ✓
    • The player quits the game.
    • The player completes a level.
  • A flag can have two states ______ and False.
    • 'True' ✓
+