{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

compund interest prog

compund interest prog - interest =...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
# Program to find interest compounded monthly # reply = raw_input("Enter annual interest rate: ") annualInterest = float(reply) monthlyInterest = annualInterest/12 print monthlyInterest principal = 100.0 p month = 1 balance = principal while month <=12:
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: interest = balance*monthlyInterest/100.0 balance = balance+interest print "Month:",month, "Balance:","%.2f"%balance month = month+3 print "Done! Month =",month p # ctrl+c to get out of infinite loop (KeyboardInterrupt)...
View Full Document

{[ snackBarMessage ]}