Examplary
Start for free
Oak ComputingTest · Computing

2D lists challenge

The starter and exit quiz of the lesson “2D lists challenge”, from the unit “Programming: strings and lists” (Year 10 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. A 2D list is a list that contains other ___, allowing us to store data in a row and column format.
  2. What will be the output of this subroutine?def greet(name): return "Hello, " + name + "!"print(greet("Alice"))
  3. Match the concept to the definition
  4. Which of the following correctly defines a subroutine in Python?
  5. What will be the output of the following code?my_list = [10, 20, 30, 40] print(len(my_list))
  6. A list can contain mixed ___, e.g. [1, "hello", 3.14]
  7. What is a two-dimensional list?
  8. In Python, how would you access the element in the third row and second column of a 2D list named 'board'?
  9. What is the purpose of the int() function when taking user input for coordinates in the game?
  10. Which statement correctly updates the user_board by placing an ‘X’ in row 1, column 3?
  11. A ___ list is a list that contains other lists, allowing data to be organised in rows and columns.
  12. What will be the output of the following code?grid = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]print(grid[1][2])

License: OGL

2D lists challenge · Examplary