Any2Quiz
Quizzes / CBSE / Class 11 / Computer Science / Programming and Computational Thinking

Getting Started with Python Quiz - CBSE Class 11 Computer Science

Free practice quiz: Getting Started with Python (CBSE Class 11 Computer Science). 20 multiple-choice questions with answers and explanations. Play online, no sign-up needed.

This CBSE Class 11 Computer Science practice quiz has 20 multiple-choice questions on Getting Started with Python, and 20 of them come with an explanation. Try the 5 sample questions below (tap an option to check yourself), then play the full quiz online. No sign-up needed.

Start quiz: 20 questions, free

Sample questions

  1. What is Python?

    Show answer

    Answer: A. A programming language

    Python is a high-level, general-purpose programming language.

  2. How do you comment out a single line of code in Python?

    Show answer

    Answer: B. # This is a comment

    In Python, a single line comment is denoted by #.

  3. What is the output of `print(type(10))`?

    Show answer

    Answer: A. <class 'int'>

    `type()` returns the data type of a variable or value.

  4. What is an infinite loop?

    Show answer

    Answer: A. A loop that never ends

    An infinite loop lacks a condition to terminate it.

  5. What is a tuple in Python and how does it differ from a list?

    Show answer

    Answer: B. A tuple is immutable, a list is mutable

    Tuples are immutable (cannot be changed after creation), while lists are mutable.

Take the full quiz

More questions in this quiz

Answers and explanations are in the full quiz.

  1. Which of the following is a valid Python variable name?
  2. What is the output of the following Python code: `print('Hello, world!')`?
  3. What data type is the result of `10 / 3` in Python?
  4. What is the purpose of the `input()` function in Python?
  5. What will be the value of x after executing `x = 5; x += 2`?
  6. What is the difference between `=` and `==` in Python?
  7. How do you convert a string to an integer in Python?
  8. What is the boolean result of `10 > 5 and 5 < 10`?
  9. What does the `elif` keyword do in Python?
  10. Explain the difference between a `while` loop and a `for` loop in Python.
  11. What will be the output of this code: `numbers = [1, 2, 3]; print(numbers[1])`?
  12. How do you add an element to the end of a list in Python?
  13. Explain the concept of slicing in Python lists.
  14. How would you create a dictionary in Python containing key-value pairs?
  15. What is the difference between a shallow copy and a deep copy of a list in Python?

More quizzes

Browse all Programming and Computational Thinking quizzes

More to play

Daily ChallengeA new quiz every day. Keep your streak.HangmanGuess the word, letter by letter.Story QuestLearn through short interactive stories.All quizzesCBSE, ICSE, competitive exams and more.