CBSE Class 11 Computer Science Question 37 of 98

Python Programming Fundamentals — Question 16

Back to all questions
16
Question

Question 16

What will be the output of the following Python code?

>>> 6*3+4**2//5-8
  1. 13
  2. 14
  3. Error
  4. None
Answer

13

Reason — The expression 6*3+4**2//5-8 follows Python's operator precedence rules, where exponentiation (4**2) is evaluated first resulting in 16. Then, floor division (16//5) is calculated as 3. Next, multiplication (6*3) gives 18. Adding these results (18 + 3) yields 21. Finally, subtracting 8 from 21 results in 13.