17 lines
575 B
Python
17 lines
575 B
Python
|
|
# consider the following line from the autoloan program:
|
|
|
|
principal = float(input("Enter a value for the principal: "))
|
|
if(principal < 5000.) or (principal >120000.00):
|
|
print(f"The loan value {principal} is outside the allowed limits.")
|
|
exit(-1)
|
|
|
|
rate = float(input("Enter a value for the interest rate (7 for 7%): "))
|
|
|
|
numberOfYears = float(input("Enter the number of years for the loan: "))
|
|
|
|
print(f"You entered the principal value {principal}")
|
|
print(f"You entered the rate value {rate}%")
|
|
print(f"You entered the loan term value {numberOfYears} years")
|
|
|