mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25:23 +01:00
Merge pull request #159 from lukew3/master
Fix createFibList indentation error
This commit is contained in:
@@ -801,14 +801,14 @@ def surdsComparisonFunc(maxValue = 100, maxRoot = 10):
|
||||
def fibonacciSeriesFunc(minNo=1):
|
||||
n = random.randint(minNo,20)
|
||||
def createFibList(n):
|
||||
l=[]
|
||||
for i in range(n):
|
||||
if i<2:
|
||||
l.append(i)
|
||||
else:
|
||||
val = l[i-1]+l[i-2]
|
||||
l.append(val)
|
||||
return l
|
||||
l=[]
|
||||
for i in range(n):
|
||||
if i<2:
|
||||
l.append(i)
|
||||
else:
|
||||
val = l[i-1]+l[i-2]
|
||||
l.append(val)
|
||||
return l
|
||||
fibList=createFibList(n)
|
||||
problem = "The Fibonacci Series of the first "+str(n)+" numbers is ?"
|
||||
solution = fibList
|
||||
|
||||
Reference in New Issue
Block a user