Computer Science
Evaluate the expression given below if A = 16 and B = 15.
A % B // A
- 0.0
- 0
- 1.0
- 1
Python Funda
10 Likes
Answer
0
Reason — According to operator precedence, floor division (//) and remainder (%) both have equal precedence hence the expression will be evaluated from left to right.
A % B // A
= 16 % 15 // 16
= 1 // 16
= 0
Answered By
6 Likes