# File: Exercise5_2
# Author: Emily G. Allen
# rest of comments tba

# this is what needs to be handed in

def main(): # main program
    # get input from user
    growthRate = input('Please enter growth rate (float): ')
    population = input('Please enter initial population size: ')

    populationLimit = 9000000000    # regular version
    # populationLimit = input('Please enter population limit: ') # Extra Credit
    
    # calculate world population    
    year = 0
    while population < populationLimit:
        population = population * (1 + growthRate)
        year = year + 1

    # output results to screen
    print 'The year by which the population exceeds ', populationLimit, ' is ', year + 2008


# invoke main
main()
