def fibonacci_loop(n):
    if n <= 1:
        return n #you must return n if n<=1 otherwise term will be negative
    else:
        return(fibonacci_loop(n-1) + fibonacci_loop(n-2))


nterms= 10 #the user can put a term number in here and this loop will list the terms in the fibonacci sequence until that term

if nterms <= 0: #term cannot be negative
    print("Please enter a positive integer. Negatives are not accepted.")
else:
    for i in range(nterms): #if the integer is positive, the function will be able to list until "n"th term
        print(fibonacci_loop(i))
0
1
1
2
3
5
8
13
21
34