2

This is the code

start = input("Would you like to encrypt(1) or decrypt(2) your password?: ")
if start == "encrypt" or "1":
   print("Enter the password you want to encrypt: ")
elif start == "decrypt" or "2":
   print("Enter the password you want to decrypt: ")

However, when I type "decrypt" or "2" it won't print the message below, it only prints the first message? What am I doing wrong?

MrS
  • 41
  • 5
  • You have to use `if start == "encrypt" or start == "1":`. `or` is used in the boolean operator sense and not in the English sense – that other guy Feb 05 '19 at 23:49

0 Answers0