Fibonacci Series h

javascript
πŸ‘€cs
πŸ“…Last updated 14 days ago

The Fibonacci series is one of the most fascinating patterns in mathematics β€” and it shows up everywhere, from flower petals to galaxy spirals. It’s named after Leonardo Fibonacci, an Italian mathematician who introduced this sequence to Western mathematics in the 13th century.

πŸ’»Source Code

# Program to generate Fibonacci series up to n terms
      def fibonacci(n):
          # The first two terms are fixed
          a, b = 0, 1
          series = []

          # Generate n terms
          for _ in range(n):
              series.append(a)
              a, b = b, a + b  # Move forward in the series

          return series

      # Example usage
      n = int(input("Enter the number of terms: "))
      print("Fibonacci Series:", fibonacci(n))

πŸ’¬Comments (10)

πŸ”’Please login to post comments

T
test⏰posted 13 days ago

iou

T
test⏰posted 13 days ago

iou

T
test⏰posted 12 days ago

new comment added

T
test⏰posted 12 days ago

aaaaa

T
test⏰posted 12 days ago

aa dd ddd

T
test⏰posted 12 days ago

Newly Comments Added

T
test⏰posted 12 days ago

dddd

T
test⏰posted 12 days ago

zzzzz

T
test⏰posted 12 days ago

sssss

T
test⏰posted 12 days ago

ddddd

⚑Actions

Share this snippet:

πŸ‘€About the Author

c

cs

Active contributor