From 5a71ff66a961fd0648976391a4b31b9c30f8cbea Mon Sep 17 00:00:00 2001 From: Parrot user Date: Thu, 25 Feb 2021 22:47:25 +0000 Subject: [PATCH] commit script caesarCaps --- scripts/caesarCAPS.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 scripts/caesarCAPS.py diff --git a/scripts/caesarCAPS.py b/scripts/caesarCAPS.py new file mode 100644 index 0000000..6a83749 --- /dev/null +++ b/scripts/caesarCAPS.py @@ -0,0 +1,17 @@ + +text = input("Enter string in all caps for rot: ") +rot = 0 +new = 0 + +while (rot < 26): + for x in text: + if ((ord(x) + rot) > 90): + new = ((ord(x) + rot) % 90) + 64 + else: + new = ord(x) + rot + + x = chr(new) + print(x, end = "") + + print("\n") + rot += 1