#Write a code to print a Fibonacci series upto the nth term. Use the int(input()) to get an input from the user as well for the value of n.)
x = int(input("enter number of terms in the fibonacci series: "))
def fibonacci1(x):
n1 = 0
n2 = 1
sum1 = 0
if x <=0:
print("please enter a number greater than 0")
else:
for i in range(0, x):
print(sum1, end=" ")
n1 = n2
n2 = sum1
sum1 = n1 + n2
fibonacci1(x)
