Updated 11/17 files
This commit is contained in:
parent
bf3265103a
commit
d07dbc4bb2
6 changed files with 44 additions and 7 deletions
19
lecture20261117/if/if06_Solution.py
Normal file
19
lecture20261117/if/if06_Solution.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
# consider the following line from the autoloan program:
|
||||
|
||||
principal = float(input("Enter a value for the principal: "))
|
||||
|
||||
|
||||
print(f"You entered the value {principal}")
|
||||
|
||||
# Create an if statement to limit the loan principal to > $1000 and < $120,000.
|
||||
|
||||
|
||||
if principal < 1000:
|
||||
print(f"The value of the principal must be $1000.00 or greater")
|
||||
exit(-1)
|
||||
|
||||
if principal > 120000:
|
||||
print(f"The value of the principal must be $120000.00 or less")
|
||||
exit(-1)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue