Thats the code that I did and didnt get the full credit. He reply and said “Add Validations in the code instead of asking/expecting a valid input from user. Like values should be positive integer and all”. What does he mean and how do I do that?

Question: (Financial application: loan amortization schedule) The monthly payment for a given loan pays the principal and the interest. The monthly interest is computed by multiplying the monthly interest rate and the balance (the remaining principal). The principal paid for the month is therefore the monthly payment minus thenmonthly interest. Write a program that lets the user enter the loan amount, number of years, and interest rate, and then displays the amortization schedule for the loan.

```
loanAmount = eval(input("Enter loan amount, for example 120000.95: "))
numOfYears = eval(input("Enter number of years as an integer, for example 5: "))
annualInterestRate = eval(input("Enter yearly interest rate, for example 8.25: "))
monthlyInterestRate = annualInterestRate/1200
monthlyPayment = loanAmount*monthlyInterestRate / \
(1 - (pow(1 / (1 + monthlyInterestRate), numOfYears * 12)))
balance = loanAmount
print("Monthly Payment:", int(monthlyPayment * 100) / 100.0)
print("Total Payment:", int(monthlyPayment * 12 * numOfYears * 100) / 100.0)
print(format("Payment#", "<15s"), format("Interest", "<15s"), format("Principal", "<15s"), format("Balance", "<15s"))
for i in range(1, numOfYears * 12 + 1):
interest = int(monthlyInterestRate * balance * 100) / 100.0
principal = int((monthlyPayment - interest) * 100) / 100.0
balance = int((balance - principal) * 100) / 100.0
print(format(i, "<15d"), format(interest, "<15.2f"), format(principal, "<15.2f"), format(balance, "<15.2f"))
```