CBSE Python Questions on Operators
- Categories Python, Python Operators, Python
CBSE Python Question Bank on Operators:
1) Identify the Valid and invalid Operators?
- < >
- >=
- //=
- &
Ans.
- Invalid
- Valid
- Valid
- Valid
2) Identify the Valid and invalid Operators?
- in not
- >>
- is not
- %+
Ans.
- Invalid
- Valid
- Valid
- invalid
3) If i = 3, j = 2 what is the result of following expressions?
- i + 5 >= j – 6
- j * 10 < i ** 2
- i < j + 5 > j ** 4
Ans.
- True
- False
- Flase
4) How are the following two expressions different?
- ans = 9
- ans == 9
Ans. One is using assignment operator and other is using comparison operator.
5) Given that i = 4, j = 5, k = 4, what will be the result of following expressions?
- i < k
- i < j
- i <= k
- i = = j
- i = = k
- j > k
- j > = i
- j ! = i
- j < = k
Ans.
- False
- True
- True
- False
- True
- True
- True
- True
- False
6) Evaluate the following if a = 15 , b = 3
- a / b
- a // b
Ans.
- 5.3
- 5
7) Identify the type of operators?
- =
- in
- not
- ==
Ans.
- Assignment operator
- Membership Operator
- Logical operator
- Relational operator
8) Identify the type of operators?
- !=
- /=
- and
- ^
Ans.
- Relational Operator
- Assignment Operator
- Logical Operator
- Bitwise XOR
9) Solve the expressions?
- 100 // 32
- 7 / 3
- 6.5 //2
Ans.
- 3
- 2.3333333333333335
- 3
You may also like
Python Data Types
15 June, 2021
Python Tokens
15 June, 2021
Practice short problems on Python Random Module
25 April, 2020