Examplary
Start for free
Oak ComputingTest · Computing

Creating lists in Python

The starter and exit quiz of the lesson “Creating lists in Python”, from the unit “Python programming with sequences of data” (Year 9 Computing) by Oak National Academy.

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

Oak National Academy

12 questions

  1. In Python, which keyword allows you to create a block of code that only executes when a certain condition is true?
  2. Which if statement would correctly check if the variable score is greater than or equal to 80?
  3. Which of the following is correct when describing nested if statements?
  4. The = symbol in Python is used for ...
  5. What keyword is used in Python to output text to the user?
  6. S___ is used when there is more than one possible path for a program to follow.
  7. What is the purpose of an elif statement in Python?
  8. What is the correct syntax for creating a list in Python?
  9. What type of data structure is a list in Python?
  10. Each item within the list is referred to by an ___, which is its position in the list.
  11. What will the following code print?days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]print(days[3])
  12. What will the following code print?days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]print(days[7])

License: OGL

Creating lists in Python · Examplary