mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 14:35:23 +01:00
Fix genById missing args/kwargs
This commit is contained in:
@@ -2,6 +2,9 @@ from .__init__ import *
|
||||
|
||||
|
||||
def additionFunc(maxSum=99, maxAddend=50):
|
||||
print(maxSum)
|
||||
if maxAddend > maxSum:
|
||||
maxAddend = maxSum
|
||||
a = random.randint(0, maxAddend)
|
||||
# The highest value of b will be no higher than the maxsum minus the first number and no higher than the maxAddend as well
|
||||
b = random.randint(0, min((maxSum - a), maxAddend))
|
||||
|
||||
@@ -6,9 +6,9 @@ genList = getGenList()
|
||||
|
||||
|
||||
# || Non-generator Functions
|
||||
def genById(id):
|
||||
def genById(id, *args, **kwargs):
|
||||
generator = genList[id][2]
|
||||
return (generator())
|
||||
return (generator(*args, **kwargs))
|
||||
|
||||
|
||||
def make_worksheet(title):
|
||||
|
||||
Reference in New Issue
Block a user