From 5c79fef2fbcf711817a911a58a0f29c85a692386 Mon Sep 17 00:00:00 2001 From: Luke Weiler Date: Fri, 16 Oct 2020 13:17:01 -0400 Subject: [PATCH] Update mathgen.py --- mathgenerator/mathgen.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mathgenerator/mathgen.py b/mathgenerator/mathgen.py index 1f24f7e..24eb9bc 100644 --- a/mathgenerator/mathgen.py +++ b/mathgenerator/mathgen.py @@ -386,7 +386,8 @@ def primeFactors(minVal=1, maxVal=200): problem = f"Find prime factors of {a}" solution = f"{factors}" return problem, solution -def combination(maxlength=20): + +def combinationsFunc(maxlength=20): def factorial(a): d=1 for i in range(a): @@ -433,4 +434,4 @@ distance2Point = Generator("Distance between 2 points", 24, "Find the distance b pythagoreanTheorem = Generator("Pythagorean Theorem", 25, "The hypotenuse of a right triangle given the other two lengths a and b = ", "hypotenuse", pythagoreanTheoremFunc) linearEquations = Generator("Linear Equations", 26, "2x+5y=20 & 3x+6y=12", "x=-20 & y=12", linearEquationsFunc) #This has multiple variables whereas #23 has only x and y primeFactors = Generator("Prime Factorisation", 27, "Prime Factors of a =", "[b, c, d, ...]", primeFactors) -combinations=Generator("Combinations of Objects",28, "Combinations available for picking 4 objects at a time from 6 distinct objects ="," 15", combinations) +combinations = Generator("Combinations of Objects",28, "Combinations available for picking 4 objects at a time from 6 distinct objects ="," 15", combinationsFunc)