# Fibonnaci series is 1, 1, 2, 3, 5, 8, 13, ... # Create a tuple containing the initial Fibonnaci numbers parents, babies = (1,1) #Initialize the generation counter gen = 1 # Take input from the user nterms = int(input("How many terms? ")) if nterms <= 0: print("Please enter a positive integer.") else: while gen <= nterms: # multiple ways to print # print 'Generation', format(gen), ' has ', format(babies), ' babies.' print ('Generation %g has %g babies' % (gen, babies)) parents, babies = (babies, parents + babies) gen += 1