psf/black code formatting (#1277)
This commit is contained in:
committed by
Christian Clauss
parent
07f04a2e55
commit
9eac17a408
@@ -1,14 +1,17 @@
|
||||
# Fibonacci Sequence Using Recursion
|
||||
|
||||
|
||||
def recur_fibo(n):
|
||||
if n <= 1:
|
||||
return n
|
||||
else:
|
||||
(recur_fibo(n-1) + recur_fibo(n-2))
|
||||
(recur_fibo(n - 1) + recur_fibo(n - 2))
|
||||
|
||||
|
||||
def isPositiveInteger(limit):
|
||||
return limit >= 0
|
||||
|
||||
|
||||
def main():
|
||||
limit = int(input("How many terms to include in fibonacci series: "))
|
||||
if isPositiveInteger(limit):
|
||||
@@ -17,5 +20,6 @@ def main():
|
||||
else:
|
||||
print("Please enter a positive integer: ")
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user