24. Write a program to find the sum of 1st 10 numbers of Lucas series i.e., 2,1,3,4,7,11,18,.... Lucas series is such a series which starts from 2 and 1, and subsequent numbers are the sum of the previous two numbers
Answers
Answered by
0
please mark me as brainliest
Answer:
python program
def ls(n) :
a = 2
b = 1
if (n == 0) :
return a
for i in range(2, n + 1) :
c = a + b
a = b
b = c
return b
n =print("enter last number")
print(ls(n))
Similar questions