I'm just overwhelmed. This statement has a syntax error highlighted at the colon after the 8 in the first if statement and when I delete the color, it highlights print. I am referencing this code from another one almost identical to one I know works. But even copying and pasting the if statements from the old code I am getting a syntax error. Where is it? How am I missing it
print("Hello, and welcome to our program!" + \
"Follow the prompts below to begin" + \
"planning your vacation.")
# Ask about the number of guests
party = int(input("With how many people will you be traveling?" + \
"(Larger groups may qualify for a discount!)")
# Display discount
if 5 < party <= 8:
print("Cool! Your selection qualifies for a 10% discount" + \
"that will be applied at the end.")
elif 9 <= party:
print("Cool! Your selection qualifies for a 30% discount" + \
"that will be applied at the end.")
elif party < 5:
print("Sorry, your purchase does not qualify for a discount.")
Aucun commentaire:
Enregistrer un commentaire