Skip to content
KALANBLON
Show contents

Chapter 7 of 7 · 10 min

Quiz: organising a program

Lists, dictionaries, modules and organising a program: the last quiz before your certificate! You need 70% correct answers.

Quiz

5 questions · pass mark: 70%

  1. 1.What is the value of cities[1]?

    One answer

    cities = ["Dakar", "Lima", "Oslo"]
  2. 2.What is the value of stock.get("millet", 0)?

    One answer

    stock = {"rice": 4}
  3. 3.Which statements let you use sqrt from the math module? (several answers)

    Several answers possible

  4. 4.Fill in the method that adds an item at the end of a list.

    Complete the code

    shopping = ["rice"]
    shopping.____("salt")
  5. 5.What happens if this assert is false?

    One answer

    assert total([]) == 0

Your progress is saved on this device. Create a free account to keep your progress on all your devices.