Tell us what’s happening:
can you help me with step 10 problem , I am not able to fix it. its showing error
Your code so far
# User Editable Region
def caesar():
alphabet = 'abcdefghijklmnopqrstuvwxyz'
key = 3
text = 'abc'
shifted_alphabet = alphabet[key:] + alphabet[:key]
print(shifted_alphabet)
translation_table = str.maketrans(alphabet, shifted_alphabet)
encrypted_text = text.translate(translation_table)
print(encrypted_text)
# User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0
Challenge Information:
Build a Caesar Cipher - Step 10