From c5d492bb71dddd22088a938eff780da5a1192b04 Mon Sep 17 00:00:00 2001 From: lukew3 Date: Wed, 21 Oct 2020 22:51:36 -0400 Subject: [PATCH] linter fix --- mathgenerator/funcs/complex_quadratic.py | 3 +-- mathgenerator/funcs/decimal_to_roman_numerals.py | 3 +-- mathgenerator/funcs/nth_fibonacci_number.py | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/mathgenerator/funcs/complex_quadratic.py b/mathgenerator/funcs/complex_quadratic.py index b2d1292..7cbf0b0 100644 --- a/mathgenerator/funcs/complex_quadratic.py +++ b/mathgenerator/funcs/complex_quadratic.py @@ -38,10 +38,9 @@ def complexQuadraticFunc(prob_type=0, max_range=10): eq += str(c) + ' = 0' - problem = f'Find the roots of given Quadratic Equation ' + eq + problem = 'Find the roots of given Quadratic Equation ' + eq if d < 0: - roots = '' sqrt_d = (-d)**0.5 if sqrt_d - int(sqrt_d) == 0: 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