When user input is anything different from the specified letters "A", "a", "B", "b", "C", "c", "E", "e", it doesn't run the else
statement but just closes. I would also like to have it repeat the program again if user input is not any of the specified letters, how can I achieve that? I believe it would be something I'd have to add in the else statement.
user_input = input()
if user_input in ("A", "a", "B", "b", "C", "c", "E", "e"):
if user_input == "A" or user_input == "a":
print("You chose A")
elif user_input == "B" or user_input == "b":
print("You chose B")
elif user_input == "C" or user_input == "c":
print("You chose C")
elif user_input == "E" or user_input == "e":
print("You chose to exit the program")
else:
print("Something went wrong, try again")