+ 1

X=3 and num=17 so what is print(num%x)

I am still a beginner and I refuse to move on without know how the answer is 2. Thank you!

20th Jun 2021, 2:25 PM
alessandra nicole biado
alessandra nicole biado - avatar
3 Answers
+ 3
17 / 3 = 5 (5 * 3 = 15) 17 - 15 = 2 2 remains 17 / 3 = 5 17 % 3 = 2
20th Jun 2021, 5:22 PM
Alex
+ 1
% prints the remainder. 3*5=15 and 2 left as remainder
20th Jun 2021, 2:28 PM
Abhay
Abhay - avatar
- 2
Hi 👋
21st Jun 2021, 3:22 AM
shivam kushwaha
shivam kushwaha - avatar