Skip to content

Latest commit

Β 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŒ€ Fibonacci Sequence Generator (Python)

This Python script generates the Fibonacci sequence up to a user-specified number of terms. It's a great introduction to loops, functions, and input handling in Python.


πŸ“˜ What is the Fibonacci Sequence?

The Fibonacci sequence is a series of numbers where each number is the sum of the two preceding ones. It typically starts with:

0, 1, 1, 2, 3, 5, 8, 13, ...

It appears in various areas of mathematics, computer science, and even nature β€” such as in the arrangement of leaves or the pattern of a pine cone.


πŸš€ Features

  • Accepts user input for the number of terms to generate
  • Includes input validation for user-friendly errors
  • Encapsulated in a function for reusability
  • Clean terminal output of each term in the sequence

πŸ§ͺ Example Usage

$ python fibonacci_generator.py
Enter the number of Fibonacci terms to generate: 6
Fibonacci sequence:
0
1
1
2
3
5

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages