Skip to content
Closed
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
7 changes: 7 additions & 0 deletions utilities/Caesar-Cipher/Caesar-Cipher.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ def main() -> None:
elif choice in ["E", "ENCRYPT", "D", "DECRYPT"]:
message = input("📝 Enter your message: ")

if not message:
print("❌ Error: Message cannot be empty.\n")
continue

if not any(c.isalpha() for c in message):
print("⚠️ Warning: Message contains no alphabetic characters. Cipher will return unchanged.\n")

try:
shift = int(input("🔑 Enter the shift key (whole number): "))
except ValueError:
Expand Down
Loading