Question: any python experts here. can answer this with comment category and use of if and else statement and float, int, split. 3. Filename: assign2-3.py Add

any python experts here. can answer this with comment category and use of if and else statement and float, int, split.

any python experts here. can answer this with comment category and use

3. Filename: assign2-3.py Add to the script for the last assignment that takes the terms of a loan as inputs (principal, interest rate as a %, number of payments per year and the total number of years), computes the interest paid over the life of the loan and produces the same output. Specifically, add code including a try/except block so that if any of the numbers entered are invalid, an appropriate error message displays as shown in the output below. The output for the cases shown in the last assignment should still be the same. The specifications for valid input are that all inputs should be numeric, the rate should be between 0 and 100 inclusive, and the number of payments per year should be between 1 and 365 inclusive. (Source Input a. python assign2-3.py 100000 110 30 12 b. python assign2-3.py 25000 3.5 6 stuff c. python assign2-3.py 25000 3.5 6 400 Output a. Not a valid rate (between 0 and 100, inclusive). b. All inputs should be numeric c. Not a valid number of payments (between 1 and 365 inclusive) Submission Instructions: Your code should contain meaningful comments. Place your name, due date and assignment and problem number in comments at the top of the file. Cite all sources in comments. Your output should match mine exactly (in spacing, capitalization, etc.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!