Test Index
Python Revision Tour
© examsnet.com
Question : 55 of 102
Marks:
+1,
-0
What will be the output of the following statement :
print (16*5/4*2/5-8)
[CBSE 2024 Set 4]
Solution:
Concept:
* and / have the same precedence and are evaluated left to right; - is done last. The operator / always gives a float.Solution:16*5 = 8080/4 = 20.020.0*2 = 40.040.0/5 = 8.08.0-8 = 0.0Key point: The result is printed as 0.0 (a float), because / gives a float even when the division is exact.Answer:Option C (0.0)© examsnet.com
Go to Question: