Improved module format

This commit is contained in:
lukew3
2020-10-19 12:16:03 -04:00
parent f723fb1881
commit 6a0aff7652
5 changed files with 31 additions and 8 deletions

View File

@@ -2,7 +2,7 @@ import random
import math
import fractions
from .additionFunc import *
from .addition import *
from .subtractionFunc import *
from .multiplicationFunc import *
from .divisionFunc import *

View File

@@ -1,5 +1,5 @@
from .__init__ import *
from ..__init__ import Generator
def additionFunc(maxSum=99, maxAddend=50):
a = random.randint(0, maxAddend)
@@ -8,3 +8,5 @@ def additionFunc(maxSum=99, maxAddend=50):
problem = str(a) + "+" + str(b) + "="
solution = str(c)
return problem, solution
addition = Generator("Addition", 0, "a+b=", "c", additionFunc)