the-honk/gcse computer science/year 9/encryption/Caesar Cipher Encrypter.py

12 lines
244 B
Python
Raw Normal View History

2024-10-09 17:02:27 +00:00
output = ''
asc = 0
msg = input('Please input the text.')
key = input('How many characters would you like to shift that text by?')
for i in msg:
asc = ord(i)
shiftChr = asc + int(key)
output = output + chr(shiftChr)
print(output)