Question:

What will be the output of the following statement:
print(16 * 5 / 4 * 2 / 5 - 8)

Show Hint

Always follow operator precedence: parentheses first, then exponentiation, followed by multiplication/division, and finally addition/subtraction (PEMDAS).
Updated On: Jan 21, 2025
  • -3.33 
     

  • 6.0
  • 0.0 
     

  • -13.33
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is C

Solution and Explanation

The given expression evaluates step by step according to the precedence of arithmetic operators (division and multiplication from left to right, followed by subtraction): 

\[ 16 \times 5 = 80, \quad 80 \div 4 = 20, \quad 20 \times 2 = 40, \quad 40 \div 5 = 8, \quad 8 - 8 = 0.0. \] 

Therefore, the output of the statement is \( 0.0 \).

Was this answer helpful?
0
0