commit script caesarCaps
This commit is contained in:
17
scripts/caesarCAPS.py
Normal file
17
scripts/caesarCAPS.py
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user