Examplary
Start for free
Oak ComputingTest · Computing

Arrays and lists

The starter and exit quiz of the lesson “Arrays and lists”, 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. What will be the output of this program?word = "MOONLIGHT"print(word.lower())
  2. What does the random.choice() function do?
  3. What will be the output of this program?fruit = "Strawberry"print(fruit[5:10].upper())
  4. ___ is a way of joining strings using the + operator to make a new string.
  5. ___ is the process of checking an input meets certain requirements.
  6. What must be included in a Python program to use the random module?
  7. Which of the following is true about arrays?
  8. What is the correct way to create a list in Python?
  9. In Python, the index of the first item in a list starts at ___.
  10. Which of the following methods allows you to pick a random planet from the list planets?
  11. Lists are ___ data structures, meaning they can have items added or removed and can store different data types in the same list.
  12. Arrays are ___ data structures, meaning they cannot have items added or removed and they must contain items of the same data type.

License: OGL

Arrays and lists · Examplary