What is the output of this Python code

Tekera

Tekera

New member
Freecoin
267
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
4,876 Freecoin
J
Johnhendrick
645 Freecoin
S
Smith16
607 Freecoin
Davy200
Davy200
590 Freecoin
nathan69
nathan69
426 Freecoin
Laureine
Laureine
415 Freecoin
A
anajeen
395 Freecoin
C
codeguru
282 Freecoin
Tekera
Tekera
267 Freecoin
P
Peterparker87
239 Freecoin
Top