SHOW:
|
|
- or go back to the newest paste.
| 1 | #5.27 | |
| 2 | ||
| 3 | def main(): | |
| 4 | - | print("Interest Rate","Monthly Payment", "Total Payment")
|
| 4 | + | |
| 5 | years = eval(input("Number of Years: "))
| |
| 6 | print(format("Interest Rate","<25s"),format("Monthly Payment","<25s"), format("Total Payment","<25s"))
| |
| 7 | count = .05 | |
| 8 | while (count <= .08125): | |
| 9 | - | print(round(count * 100, 3), monthlyPayment, totalPayment) |
| 9 | + | |
| 10 | totalPayment = monthlyPayment * years * 12 | |
| 11 | print(format(round(count * 100, 3),"<25f"), format(monthlyPayment,"<25f"), format(totalPayment,"<25f")) | |
| 12 | count = count + (1 / 8) / 100 | |
| 13 | main() |