Quiz

Python Basics Quiz

  1. 01.

    What is the correct file extension for Python files?

  2. 02.

    How do you create a dictionary in Python?

  3. 03.

    Which keyword is used to import a module?

  4. 04.

    How do you access the value of 'name' in {'name': 'Alice'}?

  5. 05.

    Which list method sorts the list in place?

  6. 06.

    What is the output of [1, 2, 3][1:]?

  7. 07.

    Which statement ends a loop immediately?

  8. 08.

    What is the output of bool('False')?

  9. 09.

    What is the output of print(2 ** 3)?

  10. 10.

    Which function returns a random integer?