Examplary
Start for free
Oak ComputingTest · Computing

Using selection

The starter and exit quiz of the lesson “Using selection”, from the unit “Introduction to Python programming” (Year 8 Computing) by Oak National Academy.

Free to use. Edit it, share it and hand it out to your students.

Oak National Academy

11 questions

  1. The data a variable holds can ___ throughout the running of a program.
  2. The = symbol in Python is used for...
  3. Which of the following is an example of a string?
  4. What name would be displayed when this Python program is run?name = "Izzy"name = "Lucas" name = "Izzy"print (name)
  5. What is the result of the following Python expression?10 + 5 * 2
  6. What function is used to convert user input from a string to an integer in Python?
  7. Write the Python code to store the number 25 in a variable called age.
  8. In Python, which keyword allows you to create a block of code that only executes when a certain condition is true?
  9. In Python, which of the following code blocks demonstrates a correct way to use an if-else statement?
  10. Which if statement would correctly check if the variable score is greater than or equal to 80?
  11. You are creating a program for a game where the player wins if they roll a 6 on a dice. Write the if statement that would check if the variable dice_roll is equal to 6.

License: OGL

Using selection · Examplary