Fix genById missing args/kwargs

This commit is contained in:
lukew3
2020-12-17 14:53:12 -05:00
parent 18c11dff4c
commit 7c3d2cd5dc
3 changed files with 11 additions and 6 deletions

View File

@@ -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))

View File

@@ -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):