mirror of
https://bitbucket.org/Mattrixwv/pyclasses.git
synced 2025-12-06 18:33:58 -05:00
Fixed bug in getAllFib function
This commit is contained in:
@@ -181,7 +181,7 @@ def getAllFib(goalNumber: int) -> list:
|
||||
|
||||
#Loop to generate the rest of the Fibonacci numbers
|
||||
while(fibNums[len(fibNums) - 1] <= goalNumber):
|
||||
fibNums.append(fibNums[len(fibNums) - 2] + fibNums[len(fibNums) - 3])
|
||||
fibNums.append(fibNums[len(fibNums) - 1] + fibNums[len(fibNums) - 2])
|
||||
|
||||
#At this point the most recent number is > goalNumber, so remove it
|
||||
fibNums.pop()
|
||||
|
||||
Reference in New Issue
Block a user