0

How can we make Fibonacci series with for loop in python?

Fibonacci sequence or series 0,0,1,2,3,5,8,13,21,34..... Make an program to take input no. and then it will tell you the Fibonacci series no. Example I entered number 5 Now in Fibonacci series 3 is in 5th position then the output will be three. Please someone make it.

24th Dec 2018, 6:07 PM
Nuttin
Nuttin - avatar
3 Antworten
+ 7
Uhhhh. We encourage people to show their attempt in solving the problem before we show our solution. Show us your effort before we show ours.
24th Dec 2018, 6:24 PM
Lambda_Driver
Lambda_Driver - avatar
+ 2
is this your homework?😂 there are a lot of examples of fibonacci series in the community, use the search, but if you want to become a programmer you should try to write the code yourself
24th Dec 2018, 6:33 PM
Игорь Яковенко
Игорь Яковенко - avatar
+ 2
I typed it because it was short, but as Lambda_Driver said, this section is to ask for help if you don't understand something or stuck somewhere not for making others do your work a = int(input("Enter the index you want to check = ")) b = 0 c = 1 for i in range(a): temp = b+c b = c c = temp print(b) print("Number at position ",a," is ",b)
24th Dec 2018, 6:36 PM
Mayank Dhillon
Mayank Dhillon - avatar