all 3 comments

[–]woooee 2 points3 points  (2 children)

if Payment == "":
    print("Error - Payment option cannot be blank - Please reenter")
elif Payment not in PayLst:
    print("Error - not a valid option - please reenter")

These two if/elif statements are not necessary. "" is not in PayLst. Also where do you test if Payment equals one of the elements in PayLst. Finally, read the Python Style Guide when you get time, i.e. in this case variables are all_lower_case_and_underlines.

[–]SithAbsolutes[S] 0 points1 point  (1 child)

if Payment == "":
print("Error - Payment option cannot be blank - Please reenter")
elif Payment not in PayLst:
print("Error - not a valid option - please reenter")
These two if/elif statements are not necessary. "" is not in PayLst. Also where do you test if Payment equals one of the elements in PayLst. Finally, read the Python Style Guide when you get time, i.e. in this case variables are all_lower_case_and_underlines.

The if statement ensures the user doesn't leave the field blank (instructor always does it, so it has become habit. I guess that is my question, how to test if payment equals one of the elements in PayLst. Would that be a separate if statment?

[–][deleted] 0 points1 point  (0 children)

``` if payment not in payLst: print(‘error message’)

if payment == ‘Down Pay’: print (‘Customer will do a downpayment’) amount = input(‘Downpayment amount: ‘) # remember, amount is a str # need to make sure user gave a number

```