I’m getting the same error over and over. It is saying: You should have print('Discount:', discount) below your if...else statement.
I looked for spaces, tried with and without an extra line. No spelling mistake.
Here’s my code:
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
discount = 0
if is_member:
discount = 3
print('User qualifies for membership discount')
else:
discount = 0
print('User does not qualify for membership discount')
print('Discount is:', discount).
Can someone help me? I looked at the other topics, but didn’t find an answer.
I’ve edited your post to improve the readability of the code. Please check the accuracy of the indentation and if it’s not accurate please post again your code.
Can you also post a link to the step?
When you enter a code block into a forum post, please precede it with three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add the backticks.
It was not in my code, but I see it is in yours. I tried it several times now and removed everything. Now it’s okay and I’m in step 10. Thanks for wanting to help me!
I do think it’s a bug. I did’t do anything different this time.
Sometimes those browser-based editors can be a bit finicky with how they track changes. Resetting the step is usually the best “first move” when things seem correct but won’t pass.