diff --git a/mathgenerator/funcs/complex_to_polar.py b/mathgenerator/funcs/complex_to_polar.py index 90fb72d..ad4798d 100644 --- a/mathgenerator/funcs/complex_to_polar.py +++ b/mathgenerator/funcs/complex_to_polar.py @@ -9,7 +9,7 @@ def complexToPolarFunc(minRealImaginaryNum=-20, maxRealImaginaryNum=20): r = round(math.hypot(a, b), 2) theta = round(math.atan2(b, a), 2) plr = str(r) + "exp(i" + str(theta) + ")" - problem = f"rexp(itheta) = " + problem = "rexp(itheta) = " solution = plr return problem, solution diff --git a/mathgenerator/funcs/decimal_to_roman_numerals.py b/mathgenerator/funcs/decimal_to_roman_numerals.py index ee66ff6..c2470dc 100644 --- a/mathgenerator/funcs/decimal_to_roman_numerals.py +++ b/mathgenerator/funcs/decimal_to_roman_numerals.py @@ -25,8 +25,7 @@ def decimalToRomanNumeralsFunc(maxDecimal=4000): elif last_value == 4: solution += (roman_dict[divisor] + roman_dict[divisor * 5]) elif 5 <= last_value <= 8: - solution += (roman_dict[divisor * 5] + (roman_dict[divisor] * - (last_value - 5))) + solution += (roman_dict[divisor * 5] + (roman_dict[divisor] * (last_value - 5))) elif last_value == 9: solution += (roman_dict[divisor] + roman_dict[divisor * 10]) x = math.floor(x % divisor) diff --git a/mathgenerator/funcs/nth_fibonacci_number.py b/mathgenerator/funcs/nth_fibonacci_number.py index 3d28655..cfb7e8a 100644 --- a/mathgenerator/funcs/nth_fibonacci_number.py +++ b/mathgenerator/funcs/nth_fibonacci_number.py @@ -5,8 +5,7 @@ def nthFibonacciNumberFunc(maxN=100): golden_ratio = (1 + math.sqrt(5)) / 2 n = random.randint(1, maxN) problem = f"What is the {n}th Fibonacci number?" - ans = round((math.pow(golden_ratio, n) - math.pow(-golden_ratio, -n)) / - (math.sqrt(5))) + ans = round((math.pow(golden_ratio, n) - math.pow(-golden_ratio, -n)) / (math.sqrt(5))) solution = f"{ans}" return problem, solution