Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ad68eed

Browse files
abhikmppoyea
authored andcommitted
Update caesar_cipher.py (TheAlgorithms#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

Lines changed: 3 additions & 3 deletions
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 >0andkey<=94:
54+
if key inrange(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)

AltStyle によって変換されたページ (->オリジナル) /