Aprenda la Manipulación de Cadenas Construyendo un Cipher - Paso 14

Cuéntanos qué está pasando:

Hello, I would like your help in step 14 of the Cesar encryption. I have seen videos and other things and I have not been able to solve it. Thank you for your prompt help.

text = ‘Hello World’
shift = 3
alphabet = ‘abcdefghijklmnopqrstuvwxyz’
alphabet.find(‘z’)
alphabet.find(‘text[0]’)

Tu código hasta el momento


# User Editable Region

text = 'Hello World'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'
alphabet.find('z')
alphabet.find('text[0]')

# User Editable Region

Información de tu navegador:

El agente de usuario es: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36

Información del Desafío:

Aprenda la Manipulación de Cadenas Construyendo un Cipher - Paso 14

Welcome to the forum :wave:

You’ll need to edit this line instead of adding a new one.

When you put something in “quotes” it’s a string. ‘text[0]’ will be interpreted literally as ‘text[0]’. However you want to access the value stored in the variable, so you don’t use quotes

print('text[0]')
print(text[0])

Output:

text[0]
H