write a program in python to print fibanacci series like011235etc
Answers
Write a program in python to print fibanacci series like011235etc and send it to you by post or by email to your friend and send it to you by post or by email to
Hey there!!
To do this, first let's first let's see what a fibanacci series is.
In the series, the succeeding number is the sum of the numbers the two preceding numbers.
Alright, so now that we know what the series is, let's write the code for it.
series = [0,1]
for i in range(x):
add_number = series[i] + series[i+1]
series.append(add_number)
print(series)
First, we will need to have the first two number for any fibanacci series. So the two numbers(0,1) are the base line.
And for i in range(x) --- the x could be anything. It's how many numbers of the fibanacci series numbers you want.
if you want 100 numbers, your x should be 101.
Hope it helps! :)