mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25:23 +01:00
12 lines
279 B
Python
12 lines
279 B
Python
from .__init__ import *
|
|
|
|
|
|
def moduloFunc(maxRes=99, maxModulo=99):
|
|
a = random.randint(0, maxModulo)
|
|
b = random.randint(0, min(maxRes, maxModulo))
|
|
c = a % b if b != 0 else 0
|
|
|
|
problem = str(a) + "%" + str(b) + "="
|
|
solution = str(c)
|
|
return problem, solution
|