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
if is_weekend:
extra_charges = 2
print(‘Extra charges will be applied’)
else:
print(‘No extra charges will be applied’)
print(‘Extra charges:’, extra_charges)
if is_weekend or show_time == ‘Evening’:
print(is_weekend or show_time == ‘Evening’)
I have been stucking at last if condition 1 or condition 2:
Here, you need to edit the existing if statement to use the or keyword and check if show_time is equal to ‘evening'.
This means that you should edit this line :
To include also checking show_time {is equal to} 'Evening' using or (of course, replace {is equal to} with the corresponding operation). To help you, you can use the model :
if condition1 or condition2:
Where you need to replace condition1 and condition2 with your conditions.
The if statement you wrote is correct, but you should have added to the existing if statement rather than creating a new if statement. The print() was not asked.