I want to write a caesar cipher with two keys; one for vowels and another for consonants.
I have words with only capital letters. I've written some code, but I know this is wrong. I want to follow that way. Can someone help me:
def ceasar(word, key1, key2):
c = ""
for i in range(len(word)):
zn = word[i]
for x in zn:
if x=="A" or x=="E" or x=="I" or x=="O" or x=="U":
c += chr((ord(zn) + key1-65) % 26 + 65)
else:
c += chr((ord(zn) + key2-65) % 26 + 65)
return c