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:')) | |
#You inverted round() and float() : you cant round() a string, it has to be cast as a float before, using float() | |
annualrate= round(float(raw_input('Enter the annual credit card interest rate as a decimal:')), 2) | |
#Python doesnt know what 'year' is. You have to divide by 12 | |
#monthlyrate= round(annualrate/year, 2) | |
monthlyrate= round(annualrate/12, 2) | |
#Here you want to initialize key variables used by the loops |