Skip to main content
Menu
Home Quizzes Categories Current Affairs GK AI ToolsNEW Advertise Contact

Computer & Technology - Python

Quiz on Python syntax, collections, functions, modules, exceptions, OOP, comprehensions, and programming concepts.

25 Questions
30 min Duration
40% To pass
1.00 Marks / correct

Instructions

  • This quiz has 25 questions.
  • Questions are picked at random from a bank of 50, so each attempt is different.
  • You have 30 minutes. The quiz submits automatically when time runs out.
  • You need 40% to pass.
  • There is no negative marking.
  • You can mark questions for review and return to them before submitting.
  • Correct answers and explanations are shown after you submit.

Sample Questions & Answers

A preview of 12 questions from this quiz, each with the correct answer and a written explanation. Attempt the full, timed quiz to be scored and earn XP.

  1. Question 1

    In Python, which option best describes def?

    • An anonymous function expression
    • A keyword used to catch exceptions
    • A concise syntax for constructing lists
    • The Python keyword used to define a function Correct answer
    Explanation: def is correctly described by: The Python keyword used to define a function.
  2. Question 2

    In Python, which option best describes list?

    • An iterator-producing construct that yields values lazily
    • A block that runs after try/except processing
    • An ordered and mutable collection Correct answer
    • A concise syntax for constructing sets
    Explanation: list is correctly described by: An ordered and mutable collection.
  3. Question 3

    In Python, which option best describes tuple?

    • A keyword starting an exception-handling block
    • An ordered and immutable collection Correct answer
    • A keyword used to raise an exception
    • A concise syntax for constructing dictionaries
    Explanation: tuple is correctly described by: An ordered and immutable collection.
  4. Question 4

    In Python, which option best describes dictionary?

    • A collection of key-value pairs Correct answer
    • A keyword used to catch exceptions
    • A concise syntax for constructing lists
    • A list method that adds an item to the end
    Explanation: dictionary is correctly described by: A collection of key-value pairs.
  5. Question 5

    In Python, which option best describes set?

    • A block that runs after try/except processing
    • A concise syntax for constructing sets
    • A list method that removes and returns an item
    • A collection of unique values Correct answer
    Explanation: set is correctly described by: A collection of unique values.
  6. Question 6

    In Python, which option best describes bool?

    • A keyword used to raise an exception
    • A concise syntax for constructing dictionaries
    • Python's Boolean type Correct answer
    • A list method that sorts a list in place
    Explanation: bool is correctly described by: Python's Boolean type.
  7. Question 7

    In Python, which option best describes None?

    • A concise syntax for constructing lists
    • A singleton representing absence of a value Correct answer
    • A list method that adds an item to the end
    • A function that returns a new sorted list
    Explanation: None is correctly described by: A singleton representing absence of a value.
  8. Question 8

    In Python, which option best describes len()?

    • A function that returns the length or number of items Correct answer
    • A concise syntax for constructing sets
    • A list method that removes and returns an item
    • A callable that wraps or modifies another callable
    Explanation: len() is correctly described by: A function that returns the length or number of items.
  9. Question 9

    In Python, which option best describes range()?

    • A concise syntax for constructing dictionaries
    • A list method that sorts a list in place
    • A statement used with context managers
    • A construct representing a sequence of integers Correct answer
    Explanation: range() is correctly described by: A construct representing a sequence of integers.
  10. Question 10

    In Python, which option best describes import?

    • A list method that adds an item to the end
    • A function that returns a new sorted list
    • A statement used to load a module or names Correct answer
    • An object controlling setup and cleanup around a block
    Explanation: import is correctly described by: A statement used to load a module or names.
  11. Question 11

    In Python, which option best describes module?

    • A list method that removes and returns an item
    • A Python file or importable unit of code Correct answer
    • A callable that wraps or modifies another callable
    • An approach based on supported behavior rather than explicit type
    Explanation: module is correctly described by: A Python file or importable unit of code.
  12. Question 12

    In Python, which option best describes package?

    • A structured collection of Python modules Correct answer
    • A list method that sorts a list in place
    • A statement used with context managers
    • An object that produces values one at a time
    Explanation: package is correctly described by: A structured collection of Python modules.

Login/Register to attempt the full quiz and earn XP.

Explore more: All Computer & Technology quizzes · Python

Database Concepts and SQL

Relational databases depend on well-structured tables, relationships and queries. This quiz helps you revisit SQL, keys, normalization, indexes and transaction concepts.

Frequently Asked Questions

Each attempt serves 25 questions, drawn at random from a bank of 50, with 30 minutes.

You need at least 40% to pass this quiz.

No, there is no negative marking on this quiz.

Yes. You can attempt this quiz again at any time, though first-attempt XP bonuses apply only once.

Sign in to attempt this quiz and earn XP.

Login to Start Create free account

Related Quizzes