My issue is not solved
new_index = offset * direction but it still not taking it
it is saying to keep on trying for this
please look into it and let me know how can i proceed
Your code so far
text = 'Hello Zaira'
custom_key = 'python'
def vigenere(message, key, direction):
key_index = 0
alphabet = 'abcdefghijklmnopqrstuvwxyz'
encrypted_text = ''
for char in message.lower():
# Append space to the message
if char == ' ':
encrypted_text += char
else:
# Find the right key character to encode
key_char = key[key_index % len(key)]
key_index += 1
# Define the offset and the encrypted letter
offset = alphabet.index(key_char)
index = alphabet.find(char)
# User Editable Region
new_index = offset * direction
# User Editable Region
encrypted_text += alphabet[new_index]
return encrypted_text
#encryption = vigenere(text, custom_key)
#print(encryption)
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Challenge Information:
Learn String Manipulation by Building a Cipher - Step 71
You need to multiply offset by direction in the new_index calculation, without any extra parentheses around that operation. Make sure you’re just multiplying the two values and using that result directly.
Thanks but this is the message i am getting even after typing the right code line could you please look into this and let me know what can i do to solve the issue.
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 Help button located on the challenge. This button only appears if you have tried to submit an answer at least three times.
The 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.
Hi. If you put through the wrong answer 3 times for step 70 then the help button in the picture above will appear. It doesn’t appear the first two times. The forum helps people by having the threads for the correct step.
the help button is right next to the reset button, you may need to submit a few times for it to appear but it’s there
it creates a template with your code properly formatted, and a link to the step, so if you really can’t, make sure you include those elements in your post
i understood the first paragraph but not getting your point in the second one and yes i can see the help button here but when i click it is asking me to creat a help post on the forum or check if your question has already been answered on the forum which i have already done so now what?