All pastes #1029699 Raw Edit

Mine

public text v1 · immutable
#1029699 ·published 2008-05-26 08:54 UTC
rendered paste body
#Quick test

# Defining variables

money = input("Money? ") # Original input
percent = input("Percent? ") / 100.00 #To get the .10 from entry of 10
ap = percent + 1 # To get the percent + origianl (110 for 10%)
moneyb = money # To keep track of original money, we modify instead moneyb
month = input("Months? ") # Input of time
count = 0 #Setting count to 0 for calculations
added = input("Money added at end of month? ") #To add in additional ammmounts

# Calculations - count incriment to keep track of months, month decriment
# to keep track of how long it should go, and the actual calculations to
# repeat until the duration is over. 

while month != 0: 
    count = count + 1
    print "Month: ",count
    print "Interest percent: ", percent
    print "Interest payment: ", percent * moneyb
    print "New ammount at end of month: ", ap * moneyb + added
    moneyb = moneyb * ap + added
    month = month - 1
    
print "Your total money after", count, "months is", moneyb
print "You started out with", money,
print "and you now have a profit of", moneyb - ( count * added ) - money