Skip to content

Commit ad68eed

Browse files
abhikmppoyea
authored andcommitted
Update caesar_cipher.py (#702)
1 parent af08a67 commit ad68eed

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ciphers/caesar_cipher.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,16 @@ def main():
4242
print("4.Quit")
4343
choice = input("What would you like to do?: ")
4444
if choice not in ['1', '2', '3', '4']:
45-
print ("Invalid choice")
45+
print ("Invalid choice, please enter a valid choice")
4646
elif choice == '1':
47-
strng = input("Please enter the string to be ecrypted: ")
47+
strng = input("Please enter the string to be encrypted: ")
4848
key = int(input("Please enter off-set between 1-94: "))
4949
if key in range(1, 95):
5050
print (encrypt(strng.lower(), key))
5151
elif choice == '2':
5252
strng = input("Please enter the string to be decrypted: ")
5353
key = int(input("Please enter off-set between 1-94: "))
54-
if key > 0 and key <= 94:
54+
if key in range(1,95):
5555
print(decrypt(strng, key))
5656
elif choice == '3':
5757
strng = input("Please enter the string to be decrypted: ")

0 commit comments

Comments
 (0)