diff --git a/mathgenerator/funcs/basic_math/compare_fractions.py b/mathgenerator/funcs/basic_math/compare_fractions.py index 851e0ec..2df9fe1 100644 --- a/mathgenerator/funcs/basic_math/compare_fractions.py +++ b/mathgenerator/funcs/basic_math/compare_fractions.py @@ -21,7 +21,7 @@ def compareFractionsFunc(maxVal=10, style='raw'): solution = "<" else: solution = "=" - + if style == 'latex': problem = f"Which symbol represents the comparison between \\(\\frac{{{a}}}{{{b}}}\\) and \\(\\frac{{{c}}}{{{d}}}\\)?" else: diff --git a/mathgenerator/funcs/basic_math/exponentiation.py b/mathgenerator/funcs/basic_math/exponentiation.py index b4fa8ad..ad8b32c 100644 --- a/mathgenerator/funcs/basic_math/exponentiation.py +++ b/mathgenerator/funcs/basic_math/exponentiation.py @@ -7,7 +7,7 @@ def exponentiationFunc(maxBase=20, maxExpo=10, style='raw'): if style == 'latex': problem = f"\\({base}^{{{expo}}}\\)" - solution = "\\(" + str(base**expo) + "\\)" + solution = "\\(" + str(base**expo) + "\\)" else: problem = f"{base}^{expo} =" solution = str(base**expo) diff --git a/mathgenerator/funcs/basic_math/is_prime.py b/mathgenerator/funcs/basic_math/is_prime.py index 07981de..179a9ad 100644 --- a/mathgenerator/funcs/basic_math/is_prime.py +++ b/mathgenerator/funcs/basic_math/is_prime.py @@ -5,7 +5,7 @@ def isprime(max_a=100): a = random.randint(2, max_a) problem = f"Is {a} prime?" if a == 2: - solution = "Yes" + solution = "Yes" return (problem, solution) if a % 2 == 0: solution = "No" diff --git a/mathgenerator/funcs/basic_math/power_of_powers.py b/mathgenerator/funcs/basic_math/power_of_powers.py index 714107a..eb69319 100644 --- a/mathgenerator/funcs/basic_math/power_of_powers.py +++ b/mathgenerator/funcs/basic_math/power_of_powers.py @@ -6,7 +6,7 @@ def powerOfPowersFunc(maxBase=50, maxPower=10, style='raw'): power1 = random.randint(1, maxPower) power2 = random.randint(1, maxPower) step = power1 * power2 - + if style == 'latex': problem = "Simplify \\(" + str(base) + "^{" + str(power1) + "^{" + str(power2) + "}}\\)" solution = f"\\({base}^{{{step}}}\\)"