Learn String Manipulation by Building a Cipher - Step 4

Tell us what’s happening:

Im pretty sure i put in the correct code can anyone help me figure out whats wrong with it?

Your code so far


/* User Editable Region */

my_string = "Hello World"
print(my_string[6])

/* User Editable Region */

Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 4

The instructions didn’t ask for the name of this variable to be changed?

so what should i do to fix it?

If it wasn’t asked to be changed, try putting it back the way it was

i tried doing that in the form of
text = ‘Hello World’

print(my_string[6])

but it still marks it as wrong

Ok, you still have the other variable. Gotta use the one the instructions ask for or the tests can’t recognize it

Now, instead of printing text, print just the character at index 6.

They want the character of the string variable you already have in the code

Ah i see now thank you very much for your time.

1 Like

please, can you tell me what the solution is?
ive tried every way and cant seem to pass this step even though the codes come out “correct”. it keeps asking me to pass text[6] to my print() funtion?

If you have a question about a specific challenge as it relates to your written code for that challenge and need some help, click the Ask for Help button located on the challenge (it looks like a question mark). This button only appears if you have tried to submit an answer at least three times.

The Ask for Help button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.