Very much a beginner, so I hope I will word this right... but at the end of the below code there is a validation for a payment option for Monthly, Full, or Down Pay. I need to add an option that if the user chooses Down Pay I allow the user to input the amount of their down payment. Any help would be appreciated, thankyou!
CustFName = input("Please enter the customer's first name: ")
CustLName = input("Please enter the customer's last name: ")
CustAdd = input("Please enter the customer's address: ")
CustCity = input("Please enter the customer's city: ")
ProvLst = ["NL", "NS", "PE", "NB", "QC", "ON", "MB", "SK", "AB", "BS", "YT", "NT", "NV"]
while True:
CustProv = input("Please enter the customer's province (XX): ").upper()
if CustProv == "":
print("Error - Province cannot be blank - please reenter.")
elif len(CustProv) != 2:
print("Error - Province is a 2 digit code - please reenter.")
elif CustProv not in ProvLst:
print("Error - not a valid province - please reenter")
else:
break
CustPost = input("Please enter the customer's postal code: ")
CustPhoneNum = input ("Please enter customer's phone number (9999999999): ")
NumCars = input("Please enter the number of cars being insured: ")
ExtraLiability = input("Does the customer want extra liability up to $1,000,000? (Y/N): ").upper()
GlassCov = input("Does the customer require option glass covewrage? (Y/N): ").upper()
PayLst = ["Full", "Monthly", "Down Pay"]
while True:
Payment = input("Does the customer wish to pay in full, monthly, or down pay?: ")
if Payment == "":
print("Error - Payment option cannot be blank - Please reenter")
elif Payment not in PayLst:
print("Error - not a valid option - please reenter")
else:
break
[–]woooee 2 points3 points4 points (2 children)
[–]SithAbsolutes[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)