i am unable to submit the code even though the code is correct it is showing that have an else clause
Your code so far
# User Editable Region
# Assuming these variables exist from previous steps
is_member = True
is_weekend = False
discount = 0
# --- Your task was here ---
if is_member:
discount = 20
print("User qualifies for membership discount")
else:
# Added message for not qualifying
print("User does not qualify for membership discount")
# Display the updated discount
print("Discount:", 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
It looks like you may have changed the starting code in areas you were not asked to change, which will cause the tests to fail. Please click the reset button to restore the original code and try again.
@bhanuprakash20@dhess Heyy , hope you are well. I have been facing the similar challenges. I have ensured to place the correct code, placing indentations only where they are needed. I have tried to run the code several times but it corrects me even when I’m accurate. if you have figured it out pls do assist.
Please create your own topic when you have specific questions about your own challenge code. Only respond to another thread when you want to provide help to the original poster of the other thread or have follow up questions concerning other replies given to the original poster.
The easiest way to create a topic for help with your own solution is to click the Ask for Help button located on each challenge. This will automatically import your code in a readable format and pull in the challenge url while still allowing you to ask any question about the challenge or your code.