Add files via upload

This commit is contained in:
helplessThor
2020-10-19 19:33:00 +05:30
committed by GitHub
parent b1a06816dd
commit 76c8d0e560
76 changed files with 1393 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
from .__init__ import *
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)))
solution = f"{ans}"
return problem, solution