Page 488 - ComputerScience_Class_11
P. 488
Ans. a = 10
b = 3
c = 0
d = a // b
result = c + d
print("Result:", result)
Unsolved Questions
A. Tick ( ) the correct option.
1. Which of the following is an example of a ternary operator in Python?
a. x = 10 + 5 b. max_value = a if a > b else b
c. y = not x d. z = x and y
2. Where can the not operator be used in Python?
a. To check for equality b. To perform addition
c. To perform bitwise operations d. To negate a condition
3. Identify the type of operator used in the following expression: x = 5 * 3.
a. Arithmetic operator b. Comparison operator
c. Assignment operator d. Logical operator
4. What is the output of 3 == 3 in Python?
a. 0 b. False
c. True d. None
5. Which of the following is a logical operator in Python?
a. == b. and
c. ** d. =
6. What will the result of the expression 3 * 2 + 5 be?
a. 5 b. 16
c. 13 d. 11
B. Fill in the blanks.
1. ………………… operators are used to assign values to variables.
2. An operator performs operations on one or more ………………….
3. The not in operator checks whether a specified element ………………… in a sequence.
4. The >= operator checks whether the ………………… operand is greater than or equal to the ………………… operand in Python.
5. Logical operators are used to perform ………………… operations on two or more conditions.
6. The ………………… operator checks whether two operands are exactly the same object in memory.
C. Answer the following questions:
1. How does the not operator work in Python?
2. What is an operator?
3. What is meant by a unary operator?
4. Differentiate between explicit and implicit type conversion in Python.
5. Explain each of the following operators with examples:
a. Unary operator
b. Binary operator
c. Ternary operator
6. Explain the following Bitwise operators with examples:
a. Bitwise AND (&)
b. Bitwise OR (|)
c. Bitwise XOR (^)
7. What are identity operators in Python?
8. What are the different types of logical operators in Python?
486 Touchpad Computer Science (Ver. 3.0)-XI

