Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Text_encryption.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
#ENCRYPT

plain_text = input("Enter a message to encrypt: ")
if not plain_text.isalpha():
print("Error: Only alphabets are allowed!")
exit()
cipher_text = ""

for letter in plain_text:
Expand All @@ -26,6 +29,9 @@

#decrypt
cipher_text = input("Enter a message to decrypt: ")
if not cipher_text.isalpha():
print("Error: Only alphabets are allowed!")
exit()
plain_text = ""

for letter in cipher_text:
Expand Down