mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 14:35:23 +01:00
Update addition.py
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
from .__init__ import *
|
from .__init__ import *
|
||||||
|
|
||||||
|
|
||||||
def additionFunc(maxSum=99, maxAddend=50, style='raw'):
|
def addition_func(maxSum=99, maxAddend=50, style='raw'):
|
||||||
if maxAddend > maxSum:
|
if maxAddend > maxSum:
|
||||||
maxAddend = maxSum
|
maxAddend = maxSum
|
||||||
a = random.randint(0, maxAddend)
|
a = random.randint(0, maxAddend)
|
||||||
@@ -19,4 +19,4 @@ def additionFunc(maxSum=99, maxAddend=50, style='raw'):
|
|||||||
return problem, solution
|
return problem, solution
|
||||||
|
|
||||||
|
|
||||||
addition = Generator("Addition", 0, "a+b=", "c", additionFunc)
|
addition = Generator("Addition", 0, "a+b=", "c", addition_func)
|
||||||
|
|||||||
Reference in New Issue
Block a user