Sorry, your code does not pass. You're getting there. You should reassign text the string Albatross. Do not modify text = 'Hello World'. i am getting the mes

Tell us whSorry, your code does not pass. You’re getting there.

You should reassign text the string Albatross. Do not modify text = ‘Hello World’.

at’s happening:
Describe your issue in detail here.

Your code so far


# User Editable Region

if 'number' in locals():
    del number

# Reassign the 'text' variable with the string 'Albatross'
text = "Albatross"
shift = 3
alphabet = "abcdefghijklmnopqrstuvwxyz"

# Iterate over each character in 'text'
for char in text.lower():
    # Find the index of the current character in 'alphabet'
    index = alphabet.find(char)

    # Check if the character is found in 'alphabet'
    if index != -1:
        # Perform the shift and calculate the new index
        shifted = alphabet[(index + shift) % 26]
        new_index = index + shift

        # Print the results
        print(f"Character: {char}, Shifted: {shifted}, Original Index: {index}, New Index: {new_index}")




# 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/120.0.0.0 Safari/537.36

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 28

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.

Why does your code keep getting this line? Any idea?

It seems to be there every time you post. Is it visible when you are coding the problem, or does it only appear when you make the forum post?

I think it wants you to keep the existing line:

text = 'Hello World'

and add a new line re-assigning the text variable.