Build a Caesar Cipher - Step 12

Tell us what’s happening:

i dont understand step 12 what does it mean by “You should have a variable named encrypted_text in the global scope.”

Your code so far

text = "freeCodeCamp"
shift = 3
def caesar(text, shift):
    alphabet = 'abcdefghijklmnopqrstuvwxyz'
    shifted_alphabet = alphabet[shift:] + alphabet[:shift]
    translation_table = str.maketrans(alphabet, shifted_alphabet)
    global encrypted_text = text.translate(translation_table) 

# User Editable Region

    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/147.0.0.0 Safari/537.36 Edg/147.0.0.0

Challenge Information:

Build a Caesar Cipher - Step 12

Hi @pewIpew

Please remove these two lines from your code, or reset the step.

In the global scope means the variable is not indented.

After the function definition, add the variable and assign a call to the caesar function with the arguments mentioned in the instructions.

Happy coding

Thank you, got the solution