Create a program that calculates the interest on a loan. This program should make it easy for the user to enter numbers. Console Interest Calculator Enter loan amount: $100,000 Enter interest rate:...


This should be written in Python. The outcome should look like the attachment which include the spacing. It should have a Main and functions.


Create a program that calculates the interest on a loan. This program should make it easy for the user to<br>enter numbers.<br>Console<br>Interest Calculator<br>Enter loan amount:<br>$100,000<br>Enter interest rate: 82.275<br>$100,000.00<br>2.2758<br>Loan amount:<br>Interest rate:<br>Interest amount:<br>$2,275.00<br>Continue? (y/n): y<br>Enter loan amount:<br>100K<br>Enter interest rate: 2.275<br>Loan amount:<br>$100,000.00<br>Interest rate:<br>2.275%<br>Interest amount:<br>$2,275.00<br>Continue? (y/n): n<br>Вye!<br>Specifications<br>• Use the Decimal class to make sure that all calculations are accurate. The program should round the<br>interest that's calculated to two decimal places, rounding up if the third decimal place is five or<br>greater.<br>• The interest rate that's displayed can have up to 3 decimal places.<br>• Assume that the user will enter valid decimal values for the loan amount and interest rate with these<br>exceptions:<br>• If the user enters a dollar sign (S) at the beginning of the loan amount, remove it from the string<br>before converting the string to a number.<br>• If the user enters a comma in the loan amount, remove it from the string before converting the string.<br>• If the user enters a K at the end of the loan amount, remove the K from the end of the string, and<br>multiply the loan amount by 1000. For example, a loan amount of 50K should be converted to a value<br>of 50,000.<br>• If the user enters a percent sign (%) before or after the interest rate, remove it from the string before<br>converting the string to a number.<br>

Extracted text: Create a program that calculates the interest on a loan. This program should make it easy for the user to enter numbers. Console Interest Calculator Enter loan amount: $100,000 Enter interest rate: 82.275 $100,000.00 2.2758 Loan amount: Interest rate: Interest amount: $2,275.00 Continue? (y/n): y Enter loan amount: 100K Enter interest rate: 2.275 Loan amount: $100,000.00 Interest rate: 2.275% Interest amount: $2,275.00 Continue? (y/n): n Вye! Specifications • Use the Decimal class to make sure that all calculations are accurate. The program should round the interest that's calculated to two decimal places, rounding up if the third decimal place is five or greater. • The interest rate that's displayed can have up to 3 decimal places. • Assume that the user will enter valid decimal values for the loan amount and interest rate with these exceptions: • If the user enters a dollar sign (S) at the beginning of the loan amount, remove it from the string before converting the string to a number. • If the user enters a comma in the loan amount, remove it from the string before converting the string. • If the user enters a K at the end of the loan amount, remove the K from the end of the string, and multiply the loan amount by 1000. For example, a loan amount of 50K should be converted to a value of 50,000. • If the user enters a percent sign (%) before or after the interest rate, remove it from the string before converting the string to a number.
Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here