Python Online Compiler & Playground
HTML/CSS/JavaScript
HTML
CSS
Javascript
C++
C
PHP
Java
Python
Swift
C#
Ruby
Node.JS
Kotlin
jQuery
Go
R
TypeScript
Start Python Course
Register
modulo (Python)
0
Author: ꧁༺ Jenspi ༻꧂
Dark
Public
Save
PY
py
1
2
3
4
5
6
7
# Modulo explanation
print
(
17
%
3
)
#17/3= 5 with 2 left over; prints 2
print
(
6
%
2
)
#6/2= 3 with 0 left over
print
(
10
%
1
)
#n%1 is always 0
print
(
2833782
%
1
)
Enter to Rename, Shift+Enter to Preview
OUTPUT