Chapter 5 · Class 11 · CBSE · Science Computer Science

Getting Started with Python

25 practice questions · 5 marks weightage

Topics in this chapter

  • Python Basics and Interpreter Modes
  • Identifiers, Keywords and Tokens
  • Variables and Dynamic Typing
  • Data Types and Type Conversion
  • Operators and Expressions
  • Input and Print Functions
  • Errors, Comments and Indentation
  • Modules and Library Functions

Cheat sheet

Cheat Sheet

Practice questions

  1. Question 1Q-F2CDCD

    In Python's interactive mode, what does the prompt >>> generally indicate?

    1. A.Python is ready to receive a command
    2. B.Python has detected a syntax error
    3. C.A Python program has finished execution
    4. D.Python is displaying the value of a variable
    See the answer and solution
  2. Question 2Q-7F3F6F

    What will be printed when the following Python code is executed and the user enters 12 on the first line and 3 on the second line? a = input() b = input() print(a + b)

    1. A.15
    2. B.123
    3. C.12 3
    4. D.A TypeError is raised
    See the answer and solution
  3. Question 3Q-9E0268

    Explain the difference between a syntax error and a runtime error in Python, and give one example of each.

    See the answer and solution
  4. Question 4Q-30D862

    Which of the following is a valid Python identifier?

    1. A.2total
    2. B.total-value
    3. C.total_2
    4. D.class
    See the answer and solution
  5. Question 5Q-7D64CD

    What is the output of the following Python code? x = 7 y = 2 print(x // y, x % y)

    1. A.3 1
    2. B.3.5 1
    3. C.4 0
    4. D.3 0
    See the answer and solution

20 more questions on Getting Started with Python

Sign up free to practise the full chapter. Questions you get wrong come back until you've mastered them.

Start practising free

Free to start · No credit card needed