Skip to content

Returns nth digit in Fibonacci sequence using iteration or recursion.

Notifications You must be signed in to change notification settings

HammerMeetNail/fibonacci

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

This is a simple exercise in Python that helps to highlight some of the basics 
of the language. It was written with Python 3.4.

Background:

The Fibonacci Sequence is an infinite series of numbers that begins with 
integers 0 and 1. The  subsequent digit in the sequence is always the sum of the 
last two integers in the series. It looks something like this:

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ...

Goal:

Have the program return the nth number within the Fibonacci Sequence, e.g., if 
the user wishes to know the first digit of Fibonacci, the program *must* return 
0. If they wish to know the second digit, the program *must* return 1. If they 
wish to know the 10th digit, the program *must* return 34, so on and so forth. 

About

Returns nth digit in Fibonacci sequence using iteration or recursion.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages