# Kevin Logan
# Section 10
# kmlo225@g.uky.edu
# December 3, 2012
# What happens if looper1 is called with the argument 0?
#       Nothing happens because it doesnt pass the if statement because it's less than 1.

# What happens if looper2 is called with the argument 100?
#       Nothing happens because it doesn't pass the if statement because it's greater than 11

# discover the name of the sequence of numbers which is generated by looper3
#       It is a Fibonacci sequence
# Recursive functions
def main ():
     n = 10
     looper1 (n)
     print()
     n = 2
     looper2 (n)
     print()
     for n in range(10):
         print(looper3(n), end=" ")
     print()

def looper1(n):
    if n > 1:
         print (n)
         looper1 (n-1)

def looper2(n):
    if n < 11:
         print(n)
         looper2 (n+1)

def looper3(n):
    if n < 0:
       return -1
    elif n == 1 or n == 0:
       return 1
    else:
       return looper3(n-1) + looper3(n-2)

main()
