Build a Movie Ticket Booking Calculator - Step 8

Tell us what’s happening:

Each time I tried running the code it will display you should print User qualifies for membership discount inside your new if statement on the console and have already done that.

Your code so far

base_price = 15
age = 21
seat_type = 'Gold'
show_time = 'Evening'

if age > 17:
    print('User is eligible to book a ticket')

if age >= 21:
    print('User is eligible for Evening shows')
else:
    print('User is not eligible for Evening shows')

is_member = True
is_weekend = False


# User Editable Region

discount = 0
if is_member:
    discount = 3
    print('User qualifies for membership discount.')
else: 
    print('User does not qualifies for membership discount.')
    print('User Qualifies for membership discount:')

# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36

Challenge Information:

Build a Movie Ticket Booking Calculator - Step 8

Does this step ask for the else?

no, just trying different things to make the code work

Is this the exact message you were asked to print?

yes, and have tried it, that’s why i resort to adding different codes if it will work

Are you sure? Look closely. If necessary, copy/paste the message from the instructions.

okay, here it is: Create an if statement to check if is_member is truthy. Inside the body of the if statement, update the discount value to 3 and print User qualifies for membership discount to the terminal.

No. I meant you should copy the “If user qualifies…” message from the instructions and paste it in your code to replace what you have there. You have an extra character that was not asked.

After i’ve done that, this is the result i always get. You should print User qualifies for membership discount inside your new if statement. Remember to surround the message with single or double quotes.

×

you may have an extra character that is not present in the istructions, have you tried removing the message and copy pasting it again?

Wow!!!
thanks so much @ dhess, @iLM, I really appreciate

always double check the punctuation! it’s a character that often trip people up