mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 14:35:23 +01:00
complete restructure of the project. minor tweaks
This commit is contained in:
11
mathgenerator/funcs/divisionFunc.py
Normal file
11
mathgenerator/funcs/divisionFunc.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from .__init__ import *
|
||||
|
||||
|
||||
def divisionFunc(maxRes=99, maxDivid=99):
|
||||
a = random.randint(0, maxDivid)
|
||||
b = random.randint(0, min(maxRes, maxDivid))
|
||||
c = a / b
|
||||
|
||||
problem = str(a) + "/" + str(b) + "="
|
||||
solution = str(c)
|
||||
return problem, solution
|
||||
Reference in New Issue
Block a user