Build a Movie Ticket Booking Calculator - Step 14

Tell us what’s happening:

please help me, As I am not be able to understand where to use “or” operator

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 = False
is_weekend = False

discount = 0
if is_member and age >= 21:
    discount = 3
    print('User qualifies for membership discount')
else:
    print('User does not qualify for membership discount')
print('Discount:', discount)

extra_charges = 0

# User Editable Region

if is_weekend or show_time= Evening

# User Editable Region

    extra_charges = 2
    print('Extra charges will be applied')
else:
    print('No extra charges will be applied')
print('Extra charges:', extra_charges)

if 

Your browser information:

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

Challenge Information:

Build a Movie Ticket Booking Calculator - Step 14

remember that = is the assignment operator, to compare you need to use a slightly different operator
also don’t forget that strings need a special character around them
and also that right after the if condition there is a colon :

finally uou have if on the last line of your code which will also cause issues

you are using an assignment operator show_time = “Evening”. But, in the task you are asked to check for the condition.

Hint: use a comparison operator in the if clause.

The or operator is used when you only need one of the conditions to be true for the whole thing to work.

In your code, it looks like you just need to fix the syntax slightly. You need to compare show_time to the string "Evening" (with quotes) and use the == operator for comparison.

Try this: code removed by moderator

hi @shanog186

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge. How to Help Someone with Their Code Using the Socratic Method

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

So sorry about that! I’m still getting used to the community rules.

Hola tengo este código , pero me sigue diciendo que “Your last if statement condition should be is_weekend or show_time == 'Evening'.” alguien podría ayudarme o darme una pista de que estoy haciendo mal ?? Muchas gracias

extra_charges = 0

if is_weekend or show_time == ‘Evening’:

extra_charges = 2

print('Extra charges will be applied')

else:

print('No extra charges will be applied')

print(‘Extra charges:’, extra_charges)

hi @gabrielandresbestoso , please create your own topic

If you have a question about a specific challenge as it relates to your written code for that challenge and need some help, click the Help button located on the challenge.

The Help button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

Gracias por la aclaración !