Welcome to Foundation of Data Science Laboratory
Welcome to Foundation of Data Science Laboratory
Write a Python program to find the a Fibonaccie Series
Without Function
# Input: number of terms in the Fibonacci series
n = int(input("Enter the number of terms: "))
# Initialize the first two terms
a, b = 0, 1
# Print the Fibonacci series
print("Fibonacci series:")
for i in range(n):
print(a, end=" ")
# Update the terms
a, b = b, a + b