Files
CyberSecurityClub/Crimson_Defense/Scripts/Caesar_Cipher/caesarCAPS.py
2021-03-29 13:37:39 -05:00

19 lines
377 B
Python

# takes in a string in all caps and prints every rotation for it
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