Cancel and confirm text

Question:

Repl link/Link to where the bug appears:

Screenshots, links, or other helpful context: when i type cancel i get the cancel text and the confirm text. i only want the cancel text when i type cancel. please help

if end == "cancel":
  print("Please Press Run.")

if end == "Cancel":
  print("Please Press Run.")

else:
  print("Sucess! You are now checking in.")

Hello @aronpesti0715, and welcome to the foums!

if end == "cancel" or end == "Cancel":
    print("Please Press Run.")
else:
    print("Success! You are now checking in.")

This code achieves the same result by checking if end is equal to either “cancel” or “Cancel” and then printing the appropriate message. Please mark this as a solution if I was helpful!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.