Posts

Showing posts with the label programming

Fibonacci Series in Python Using While Loop

Image
So, today we'll be discussing how we can make the Fibonacci series using python. What is the Fibonacci series? In the Fibonacci sequence, the sum of the two preceding numbers. it is commonly started with 0 and 1. You can read more about the history of the Fibonacci series on Wikipedia . Now, let's see how we can calculate it in python. In this python program:  We're first taking input from the user that how many terms he wants to print. (User input) Then, we have made two conditions to check if the user enters a negative number or first number so we print that accordingly. If the above of the two conditions are false then the while loop will run to print the fibonacci numbers.