Converting each plaintext character to its ASCII (integer) value and store in a list. I have done like this:
print("This program uses a Caesar Cipher to encrypt a plaintex message using the encrytion key you provide")
name = input("Enter the message to be encryted:")
key = input("Enter an intefer for an encryption key:")
name = name.upper()
x =""
for x in name:
name = ascii.append(chr(ord(name[x])+key))
print(name)
But I have an error:
Traceback (most recent call last):
File "C:\Users\Heera\Downloads\NameScore (1).py", line 10, in <module>
name = ascii.append(chr(ord(name[x])+key))
AttributeError: 'builtin_function_or_method' object has no attribute 'append'
How can I fix this?
I want the result of:
This program uses a Caesar Cipher to encrypt a plaintext message using the encryption key you provide.
Enter the message to be encrypted: CS Rox my Sox
Enter an integer for an encrytion key: 177
The fully encoded message is: DZ'SV_!T`!ZVY