MENU

Chapter 9 Operators in Python Solutions

Question - 1 : -
Write the output of the given Python code :
a = 0
a+ =2
print (a)

Answer - 1 : - 2

Question - 2 : -
Write the output of the given Python code :

print (3 + 4)
print (3 – 4)
print (3 * 4) print (3/4)
print (3 % 2)
print (3**4) #3 to the fourth power
print (3 // 4) #floor division

Answer - 2 : -

7
-1
12
0.75
1
81
0

Question - 3 : -
Write the output of the given Python code :

a = 20
if a > = 22:
print(“if”)
elif a >= 21:
print(“elif”)
else:
print(“else”)

Answer - 3 : -

else

Question - 4 : -
What is the another name of Comparison Operators?

Answer - 4 : -

Relational Operators.

Question - 5 : -
What is the use of “+” operator?

Answer - 5 : -

The “+” operator adds values on either side of the operator.

Question - 6 : -
What is the use of operator?

Answer - 6 : -

The operator subtracts right hand operand from left hand operand.

Question - 7 : -
What is the use of “*” operator?

Answer - 7 : -

The “*” operator multiplies values on either side of the operator.

Question - 8 : -
What is the use of “%” operator?

Answer - 8 : -

The “%” operator divides left hand operand by right hand operand and returns remainder.

Question - 9 : -
What is the use of “**” operator?

Answer - 9 : -

The “**” operator performs exponential (power) calculation on operators.

Question - 10 : -
What is the use of 7/” operator?

Answer - 10 : -

The 7/” operator results is the quotient in which the digits after the decimal point are removed.

Free - Previous Years Question Papers
Any questions? Ask us!
×