Fibonacci sequence up to N terms
Ask by ICSM Computer
Updated 08 Sep 2025
Fibonacci Sequence
The Fibonacci sequence is a series of numbers where:
So the sequence looks like:
0, 1, 1, 2, 3, 5, 8, 13, ...Python Program (up to N terms)
Output for
terms = 10Explanation
a = 0,b = 1.ntimes.ato the sequence.a, b→ shift forward (abecomesb,bbecomesa+b).nterms.