Tell us what’s happening:
i have tried but still have failed, listened to the clues but nohing is workin i need help
Your code so far
text = 'Hello World'
shift = 3
# User Editable Region
alphabet = 'abcdefghijklmnopqrstuvwxyz'
for char in text:
print(char)
# 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/123.0.0.0 Safari/537.36 Edg/123.0.0.0
Challenge Information:
Learn String Manipulation by Building a Cipher - Step 27
Learn to Code — For Free
a2937
April 17, 2024, 11:02pm
2
Inside the for
loop above the print
statement, you need to create a variable called index
. The variable index
is supposed to be assigned to the value returned by alphabet.find(char)
.
Let me know what further assistance. Happy coding.
What did you try?
Do you have any questions about the instructions or anything else?
2 Likes
please i need a deeper explanation especially in the last sentence. i want know where to put them and those stuff because ive tried many different things
1 Like
Inside the for
loop, before printing the current character
for char in text: #this line starts the for loop
print(char) #this line prints the current character
Your new line of code will go between those two lines
1 Like
Can you show an example of something you’ve tried?
It will help understand where you’re at and let us know what we need to explain.
system
Closed
October 27, 2024, 12:07am
9
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.