Learn String Manipulation by Building a Cipher - Step 71

Tell us what’s happening:

I wish I could send this in with a snapshot of the code because I can’t just understand why my code doesn’t pass anymore.
I’ve done everything correctly, even checked the forum. The problem isn’t the code but this platform, it’s like a glitch or something.
Kindly fix this, it’s infuriating.

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)

# User Editable Region

            index = alphabet.find(char)
            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/131.0.0.0 Safari/537.36

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 71

where is the rest of the line? you need to multiply offset by direction without removing the rest of the calculations
reset the step and try again

The rest of the code is there, it just doesn’t work

Where?
The line was new_index = (index + offset) % len(alphabet), you completely replaced this calculation

This is the hint from the help bot:
You should multiply offset by direction in the new_index assignment. Do not add other parentheses.

This was the the initial code:
new_index = (index + offset) % len(alphabet)

The new assignment is:
new_index = offset * direction

Followed by the rest of the code:

encrypted_text += alphabet[new_index]

return encrypted_text

#encryption = vigenere(text, custom_key)
#print(encryption)

you need to add the multiplication by direction inside this expression without deleting anything

Yaaaaaaay!!!
It finally worked.
Here is what I did:

**
new_index = (index + offset * direction) % len(alphabet)

**

Thank you for the assistance.