Learn String Manipulation by Building a Cipher - Step 43

Hi community. I’m really struggling with step 43, I don’t think I’m interpreting the instruction correctly hence I’m not ‘calling’ the required code. I’ve attempted various configurations still not getting it.

Instruction: " Now, instead of printing 'space!' , use the addition assignment operator to add the space (currently stored in char ) to the current value of encrypted_text ."

My Code:

Can you provide a link to the step?

General feedback:

You have an if statement but nothing is indented below it

You have some other lines of code after the if statement and before the line where you add char to encrypted_text. That line looks correct, I think it might need to be indented below the if

I didn’t understand what the question was asking me to do, but take your line of code and put it below the IF statement, and then indent it.

I’m not sure I follow you, which line of code are you referring to?

Line 10, the new line of code you added.

instead of printing 'space!',

You just needed to replace the print line, but you added it a few lines lower.

if char == ' ':

You mean if I start from the block of code I had before what I’ve posted, should have just replaced



encrypted_text += char


1 Like

Yes, the space they are talking about, is the empty space that shows on the console screen (black screen, that shows hello world). So put that code on line 8, so it’s then my line of code on line 8 and then indent it.

The instructions are frustrating, I have been having trouble understanding what they are asking.

so line 8 should be

encrypted_text += char:


Got it, thanks! :ok_hand: :ok_hand: :ok_hand:

If you ever find the instructions confusing, just create a topic on the forum and ask about it. Someone will explain it and good feedback will be used to improve the lessons.

1 Like

Sure thing, appreciate that. Thanks :ok_hand: