Learn String Manipulation by Building a Cipher - Step 49

Tell us what’s happening:

I’m still trying to find the solution to this step. Its now asking
"You should add a pair of parentheses after the function name. Don’t forget the final colon.
I don’t understand this at all … I have tried to put the parentheses in but it keeps say there is a fault

Your code so far


# User Editable Region

text = 'Hello Zaira'
shift = 3
def caesar(text, shift):
    alphabet = 'abcdefghijklmnopqrstuvwxyz'
    encrypted_message = ''

    for char in text.lower():
    if char == ' ':
        encrypted_message += char
    else:
        index = alphabet.find(char)
        new_index = (index + shift) % len(alphabet)
        encrypted_text += alphabet[new_index]
    print('plain text:', text)
    print('encrypted text:', encrypted_text)
caesar():

# 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/124.0.0.0 Safari/537.36 Edg/124.0.0.0

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 49

This function takes no arguments. So delete text and shift from the argument list.

The if - else should be inside the for loop. So, indent the if - else code block.

Delete this line.

2nd time: Please only 1 thread per topic

You can refer to your original thread:
https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-49/690738