Tell us what’s happening:
Describe your issue in detail here.
Your code so far
/* User Editable Region */
text = 'Hello World'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'
alphabet.find(text(0))
/* User Editable Region */
Your browser information:
User Agent is: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36
Challenge Information:
Learn String Manipulation by Building a Cipher - Step 12
Learn to Code — For Free
im59138
December 22, 2023, 6:19pm
2
read again the description, what is it that you should find?
Letter position, i don’t understand
im59138
December 22, 2023, 6:29pm
4
the description says " pass text[0]
to the function.", did you do that?
[quote=“ilenia, post:4, topic:657447, full:true”]
the description says " pass text[0]
to the function.", did you do that?
[/quote] Yes I tried that, it keeps writing error and I tried to see other people how they succeeded for me, it doesn’t work
im59138
December 22, 2023, 6:37pm
6
But you didn’t, you need to use square brackets to access a character of the string, you used round brackets
im59138
December 22, 2023, 6:45pm
8
you need to pass text[0]
to the function, exactly text[0]
, written like that with the square brackets, not the round brackets like you did
alphabet.find(text(‘a’))?
Sorry I’m trying to understand as best I can since I’m French speaking
im59138
December 22, 2023, 6:50pm
10
no, text[0]
has to be the argument of find
(0)
and [0]
are not the same.
I just have to put the bracket in place
im59138
December 22, 2023, 6:56pm
14
I don’t understand, what are you asking?
you need to use []
square brackets there
system
Closed
June 22, 2024, 6:56am
15
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.