Created
July 30, 2013 19:30
-
-
Save anonymous/6116090 to your computer and use it in GitHub Desktop.
Here it is with more description and parentheses.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
outbal= float(raw_input('enter the outstanding balance on your credit card:')) | |
annualrate= float(round(raw_input('Enter the annual credit card interest rate as a decimal:')), 2) | |
monthlyrate= round(annualrate/year, 2) | |
month=1 | |
x = 1 | |
while (remainder > 0): | |
while (month <= 12): | |
initialmonthlyballance = round(float(((annualrate /12)*outbal)+outbal, 2) | |
remainder = round(float(initialmonthlyballance - x10)) | |
print "Outbal minus payment equals:" remainder | |
if (y >= 0): | |
month = month + 1 | |
outbal = remainder | |
if (remainder > 0): | |
x = x + 1 | |
Else: | |
if (y <= 0): | |
print 'Monthly payment to pay off debt in 1 year:', a | |
print 'number of months needed:', month | |
print 'Balance:' b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment