Advertisements
Advertisements
प्रश्न
Give the output of the following when num1 = 4, num2 = 3, num3 = 2.
print(10 + 6 * 2 ** 2 != 9 // 4 - 3 and 29 >= 29/9)
टिप्पणी लिखिए
Advertisements
उत्तर
print(10 + 6 * 2 ** 2 != 9//4 - 3 and 29 >= 29/9)
Taking the above statement into two separate parts.
LHS:
10 + 6 * 2 ** 2 != 9//4 - 3
10 + 6 * 4 != 2 - 3
10 + 24 != -1
34 != -1
True
RHS:
29 >= 29/9
True
Now the complete equation can be written as
print(True and True)
Therefore, the output will be 'True'.
shaalaa.com
Operators - Arithmetic Operators (-,+,*,/,%)
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
