Skip to content

Instantly share code, notes, and snippets.

@Hellvince
Hellvince / gist:6116772
Last active December 20, 2015 10:39 — forked from anonymous/gist:6116132
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