Learn String Manipulation by Building a Cipher - Step 53

Tell us what’s happening:

Please someone help i tried everything its not working. i stuck in this step for 2 days please i am gonna kll myself

Your code so far

text = 'Hello Zaira'
shift = 3

def caesar(message, offset):
    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("Hello Zaira", 3)

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

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 53

it wants you to give the variables text and shift as arguments!

bro what do you mean?

i am literally tried everything but its not works

you are not passing variables as arguments, you are passing their values.
pass the names of the variables!

Can you explain it very simple? My English is not very good and can you explain it as if I were a 10 year old child in front of you?

ahahaha all good! try:


Here you are calling the function print and passing the variable message as one of the arguments

Please do not write solution code for users

1 Like

anyways i give up . Good luck to other friends

learning to code is full of obstacles like this, if you want to learn to code it’s a good idea to not give up