[Tutor] Python Question
riskxexbiz at aol.com
riskxexbiz at aol.com
Sun Jul 4 19:55:56 EDT 2021
I have a form asking for some information and I want to send an error message if the information is filled out incorrectly. See below form:
Here is the python code I am using but it is not working correctly:
# Ensure investor type is either conservative, moderate or aggressive if investor != ["conservative" or "moderate" or "aggressive"]: error_statement = "Investor Type Must Be Either Conservative, Moderate or Aggressive!" return render_template("information.html", error_statement=error_statement, investor=investor)
# Ensure investment amount is at least 50000 if investment < 50000: error_statement = "Investment Amount Must Be At Least 50000!" return render_template("information.html", error_statement=error_statement, investment=investment)
name is "investor" placeholder is "Investor Type"name is "investment" placeholder is "Investment Amount"
Thanks for any help you can give me!Larry
More information about the Tutor
mailing list