Conte-nos o que está acontecendo:
Descreva detalhadamente o problema aqui.
Seu código até o momento
# User Editable Region
text = 'Hello Zaira'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'
encrypted_text = ''
for char in text.lower():
if char == ' ':
encrypted_text += char
else:
index = alphabet.find(char)
new_index = index + shift
encrypted_text += alphabet[new_index]
print('char:', char, 'encrypted text:', encrypted_text)
alphabet(index + shift)
# User Editable Region
Informações do seu navegador:
Agente de usuário: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Informações do desafio:
Learn String Manipulation by Building a Cipher - Step 42
Surround index + shift with parentheses, and modulo the expression with 26, which is the alphabet length.
what exactly is there to do in this part?