Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
+1 vote
1.5k views
in Lists, Tuples, Sets and Dictionary by (54.8k points)
closed by

Write a program using list to generate the Fibonacci series and find sum. Program to generate in the Fibonacci series and store it in a list. Then find the sum of all values?

1 Answer

+1 vote
by (49.1k points)
selected by
 
Best answer

a=-1

b=1

n=int(input(“Enter no. of terms: “))

i=0

sum=0

Fibo=[ ] while i<n:

s = a + b

Fibo.append(s)

sum+=s

a = b

b = s

i+=1

print(“Fibonacci series upto “+ str(n) +” terms is : ” + str(Fibo))

print(“The sum of Fibonacci series: “ ,sum)

Output

Enter no. of terms: 10

Fibonacci series upto 10 terms is : [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]

The sum of Fibonacci series: 88

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

...