Jan-20-2017, 02:17 PM
You compare two variables - 'choice' and 'a' -
'a' is a varable with value "Nuclear Launch Codes". You are expecting user input to be the whole string "Nuclear Launch Codes"?
With
if choice == a:
.'a' is a varable with value "Nuclear Launch Codes". You are expecting user input to be the whole string "Nuclear Launch Codes"?
With
if choice.lower() != "a" and choice.lower() != "b" and choice.lower() != "c" and choice.lower() != "d":
you check if the user input is not a, b, c or d and if it is True why you check against a,b,c,d into the same code block? And you can do it better.if choice.lower() in 'abcd': print("Your choice is", choice) if choice.lower == 'a': #etc. if choice.lower == 'b': #etc.