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 &quot;Month:&quot;,month, &quot;Balance:&quot;,&quot;%.2f&quot;%balance month = month+3 print &quot;Done! Month =&quot;,month p # ctrl+c to get out of infinite loop (KeyboardInterrupt)...
View Full Document

Ask a homework question - tutors are online