lint fixes

This commit is contained in:
lukew3
2021-10-06 10:47:44 -04:00
parent 1b5054f6d3
commit 05b61130da
8 changed files with 12 additions and 15 deletions

View File

@@ -7,8 +7,7 @@ def nthFibonacciNumberFunc(maxN=100, format='string'):
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 = int((math.pow(golden_ratio, n) - math.pow(-golden_ratio, -n)) / (math.sqrt(5)))
if format == 'string':
solution = f"{ans}"