Test Index
Python Revision Tour
© examsnet.com
Question : 98 of 102
Marks:
+1,
-0
What will the following expression be evaluated to in Python ?
print(6/3 + 4**3//8-4)
[CBSE 2023 Compartment]
Solution:
Concept:Precedence:
** first, then /, // (left to right), then +, -. The operator / always gives a float.Explanation:Step 1: 4**3 = 64Step 2: 6/3 = 2.0 and 64//8 = 8Step 3: 2.0 + 8 - 4 = 6.0Output:6.0The result is a float because of
/, so it is 6.0 and not 6.Answer:Option C (6.0)© examsnet.com
Go to Question: