mirror of
https://hub.njuu.cf/TheAlgorithms/Python.git
synced 2023-10-11 13:06:12 +08:00
Delete lucasSeries.py
This commit is contained in:
parent
30061ecae3
commit
64c19f7a6c
@ -1,16 +0,0 @@
|
|||||||
"""Lucas Sequence Using Recursion."""
|
|
||||||
|
|
||||||
|
|
||||||
def recur_luc(n):
|
|
||||||
"""Calculate Lucas Sequence Using Recursion."""
|
|
||||||
if n == 1:
|
|
||||||
return n
|
|
||||||
if n == 0:
|
|
||||||
return 2
|
|
||||||
return recur_luc(n - 1) + recur_luc(n - 2)
|
|
||||||
|
|
||||||
|
|
||||||
LIMIT = int(input("How many terms to include in Lucas series:"))
|
|
||||||
print("Lucas series:")
|
|
||||||
for i in range(LIMIT):
|
|
||||||
print(recur_luc(i))
|
|
Loading…
x
Reference in New Issue
Block a user