The code work, but

Tell us what’s happening:

As you can see, This code seem to give me the letter “w” but i keep getting the error message that goes “you should pass text[6] to the print( )”

Your code so far


# User Editable Region

text = 'Hello World'
r = text[6]
print(r)

# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 5

To be precise, passed to the print is r variable, not the text[6]

Yep… I don’t get it, you see if i’m getting answer i need then i don’t really see why it’s not working, how do i even put it, The way the description of words used to tell me what i need to do to get to where i need to be is not adden up, I know the index of 0 is “H” but if get 6 “w” then i don’t see the problem, so if anyone can tell my why i can’t go onto step 6 please on in to detail on why this is happen. Thank you.

To be clear, what is printed by your code is the same as what will be printed when using expected answer. However the same would be with print('w'), which doesn’t prove person understands how to print the character with index 6 from the text.

Testing that is not always the easiest, sometimes tests expect to kind of follow instructions to the letter. Because they check if something is written in code the way it’s expected, instead of the checking only the result.

Step started with print(text), change only this line, without creating additional variable.