Open DarkDevil-1 opened 2 years ago
Its " if x not in options" not "if x is not in options". kundi swag
ayo its not working
nvm fixed it
options = ["a", "b", "c"] if x not in options: print('Please enter a given option') game() now my "dou you want to play again" thing is glitching. i type no, it asks me again u wanna play again?
options = ["a", "b", "c"]`
if x in options:
#ALL THE CODE HERE
h = input("Do you want to play again? (Y/N)\n==>")
j = h.lower()
if j == "y":
game()
else:
print("Invalid input, try again")
game()
You can prevent unnecessary syntax errors in the code by adding a variable options including the possible options the user can type and if the user input is not found in it you can rerun the code
options = [a,b,c]
if x is not in options:
print('Please enter a given option')
game()