modulo in python

Backtworace
1 min readAug 19, 2020

--

# inputs
a = 13
b = 5

# Stores the remainder obtained
# when dividing a by b, in c
c = a % b
print(a, “mod”, b, “=”,
c, sep = “ “)

# inputs
d = 15.0
e = 7.0

# Stores the remainder obtained
# when dividing d by e, in f
f = d % e
print(d, “mod”, e, “=”,
f, sep = “ “)

Reference modulo in python

--

--

Backtworace
Backtworace

Written by Backtworace

I am founder of <a href=”https://pythonslearning.com”>pythonslearning</a>

No responses yet