Tell us what’s happening:
I did as required. I enclosed all the code inside the ‘ceasar’ function while observing the indentation rules. The task didn’t pass. I went ahead to do task 11. Task 11 passed while this task didn’t.
Your code so far
# User Editable Region
def ceasar ():
alphabet = 'abcdefghijklmnopqrstuvwxyz'
shift = 5
shifted_alphabet = alphabet[shift:] + alphabet[:shift]
translation_table = str.maketrans(alphabet, shifted_alphabet)
text = 'hello world'
encrypted_text = text.translate(translation_table)
print(encrypted_text)
# User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36
Challenge Information:
Build a Caesar Cipher - Step 10