Created
November 6, 2017 10:10
-
-
Save E01T/6c3f8f7808812c4c1fad6fa287b15d68 to your computer and use it in GitHub Desktop.
Modulo in Python 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Also check math.fmod() and divmod | |
for i in range(20): | |
print(i%10) | |
print('\n') | |
for index, i in enumerate(range(-20,0)): | |
print('{:d}%10 {: d}'.format(i, i%10) ) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment