Any2Quiz
CBSE / 9 / Computer Science / Programming with Python

Operators and Expressions Quiz - CBSE Class 9 Computer Science

Free practice quiz: Operators and Expressions (CBSE Class 9 Computer Science). 19 multiple-choice questions with answers and explanations. Play online, no sign-up needed.

Play all 19 questions free

Sample questions

  1. Which operator is used in Python for addition?

    1. +
    2. -
    3. *
    4. /
    Show answer

    Answer: A. +

    The '+' operator is used for addition in Python, allowing you to add two numbers together.

  2. Which operator is used for exponentiation in Python?

    1. **
    2. //
    3. ^^
    4. !
    Show answer

    Answer: A. **

    The '**' operator is used for exponentiation in Python, meaning raising a number to the power of another.

  3. What is the result of 'Python' + '3'?

    1. Python 3
    2. Python3
    3. 6
    4. Error
    Show answer

    Answer: B. Python3

    In Python, using the '+' operator with strings results in concatenation. 'Python' + '3' concatenates to 'Python3'.

  4. What does 2**3 evaluate to in Python?

    1. 8
    2. 9
    3. 6
    4. Error
    Show answer

    Answer: A. 8

    The '**' operator raises the number to the power of another. Hence, 2**3 means 2 raised to the power 3, which is 8.

  5. If x = True and y = False, what does the expression x or y evaluate to?

    1. True
    2. False
    3. None
    4. Error
    Show answer

    Answer: A. True

    The 'or' operator returns True if at least one operand is True. Here, x is True, so the expression evaluates to True.

Take the full quiz

More quizzes

Browse all Programming with Python quizzes