Tell us what’s happening:
Hello,
I’m stuck here since yesterday and I really don’t understand what I am missing.
I put return not print, the spelling is correct I checked, I even tried to add the else to see if it was the missing part. The two other posts about this exercise didn’t help me to see where my mistake might be.
Thanks
Your code so far
# User Editable Region
def caesar(text, shift):
if True:
return "Shift must be a integer value.";
# User Editable Region
alphabet = 'abcdefghijklmnopqrstuvwxyz'
shifted_alphabet = alphabet[shift:] + alphabet[:shift]
translation_table = str.maketrans(alphabet + alphabet.upper(), shifted_alphabet + shifted_alphabet.upper())
return text.translate(translation_table)
encrypted_text = caesar('freeCodeCamp', 3)
print(encrypted_text)
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0
Challenge Information:
Build a Caesar Cipher - Step 16