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 freeSample questions
Which operator is used in Python for addition?
- +
- -
- *
- /
Show answer
Answer: A. +
The '+' operator is used for addition in Python, allowing you to add two numbers together.
Which operator is used for exponentiation in Python?
- **
- //
- ^^
- !
Show answer
Answer: A. **
The '**' operator is used for exponentiation in Python, meaning raising a number to the power of another.
What is the result of 'Python' + '3'?
- Python 3
- Python3
- 6
- Error
Show answer
Answer: B. Python3
In Python, using the '+' operator with strings results in concatenation. 'Python' + '3' concatenates to 'Python3'.
What does 2**3 evaluate to in Python?
- 8
- 9
- 6
- 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.
If x = True and y = False, what does the expression x or y evaluate to?
- True
- False
- None
- 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.