mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 14:35:23 +01:00
renamed modules and generators to fit pep8
This commit is contained in:
16
mathgenerator/funcs/int_division.py
Normal file
16
mathgenerator/funcs/int_division.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from .__init__ import *
|
||||
|
||||
|
||||
def divisionToIntFunc(maxA=25, maxB=25):
|
||||
a = random.randint(1, maxA)
|
||||
b = random.randint(1, maxB)
|
||||
|
||||
divisor = a * b
|
||||
dividend = random.choice([a, b])
|
||||
|
||||
problem = f"{divisor}/{dividend} = "
|
||||
solution = int(divisor / dividend)
|
||||
return problem, solution
|
||||
|
||||
|
||||
int_division = Generator("Easy Division", 13, "a/b=", "c", divisionToIntFunc)
|
||||
Reference in New Issue
Block a user