Tell us what’s happening:
I put this code in one the app and desktop it keeps sending me to this ; You should modify the arguments of your str.maketrans() call by concatenating to each argument the uppercase version of the argument itself. I don’t understand what is wrong with the code. Please look at it or click the 2 links at the bottom for more understanding. Please help me.
Your code so far
def caesar():
alphabet = 'abcdefghijklmnopqrstuvwxyz'
shift = 5
text = 'hello world'
shifted_alphabet = alphabet[shift:] + alphabet[:shift]
translation_table = str.maketrans(alphabet + alphabet.upper(), shifted_alphabet + shifted_alphabet.upper())
encrypted_text = text.translate(translation_table)
print(encrypted_text)
Lesson URL (Build a Caesar Cipher: Step 15 | freeCodeCamp.org)
