CBSE · 083Class XII · 2023Section A1 mark

Question 14

30 March 2023 · Computer Science (083)

What will the following expression be evaluated to in Python ? print(4+3*5/3-5%2)

Answer

(b) 8.0

Explanation

Operator precedence: * and / and % first. 3*5=15, 15/3=5.0, 5%2=1. Then +, -: 4 + 5.0 - 1 = 8.0.