What is the output of this Python code

Tekera

Tekera

New member
Freecoin
263
Hello everyone, I'm Starting to learn Python with sololearn. One of the quiz questions threw me, it's what is the output of this code?
x=3
num=17
print(num%x)

the answer appears to be 2 but I'm not sure why, can someone please explain lol 🤨
 

Richest Freecoded User

Most Freecoin

freecoded
freecoded
2,457 Freecoin
Davy200
Davy200
590 Freecoin
nathan69
nathan69
424 Freecoin
Laureine
Laureine
415 Freecoin
C
codeguru
295 Freecoin
Tekera
Tekera
263 Freecoin
R
ruthailand
221 Freecoin
A
Akubay
170 Freecoin
smitha
smitha
104 Freecoin
G
Gabby
93 Freecoin
Top