Learn String Manipulation by Building a Cipher - Step 53

Tell us what’s happening:

whats wrong with my code.Its give me this massge (You should pass text and shift as the arguments to your function call by including them inside the parentheses. Don’t forget to separate the arguments with a comma.)

Your code so far

text = 'Hello Zaira'
shift = 3

def caesar(message=text, offset=shift):
    alphabet = 'abcdefghijklmnopqrstuvwxyz'
    encrypted_text = ''

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

# User Editable Region

# caesar()

# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1; rv:109.0) Gecko/20100101 Firefox/115.0

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 53

you need only to work or make changes in the User Editable Region, not anywhere else

This is the function call:

This is where you define the function, the function definition:

(post deleted by author)

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

Thank for your suggestion. I totally forgot about this .I am glad to tell me bro