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
The data a variable holds can ___ throughout the running of a program.
The = symbol in Python is used for...
Which of the following is an example of a string?
What name would be displayed when this Python program is run?name = "Izzy"name = "Lucas" name = "Izzy"print (name)
What is the result of the following Python expression?10 + 5 * 2
What function is used to convert user input from a string to an integer in Python?
Write the Python code to store the number 25 in a variable called age.
In Python, which keyword allows you to create a block of code that only executes when a certain condition is true?
In Python, which of the following code blocks demonstrates a correct way to use an if-else statement?
Which if statement would correctly check if the variable score is greater than or equal to 80?
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.