curriculum/challenges/english/blocks/learn-string-manipulation-by-building-a-cipher/6553980e0527fa115c705646.md
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.
You should not have print('space!') in your code.
const commentless_code = __helpers.python.removeComments(code);
assert.notMatch(commentless_code, /print\s*\(\s*("|')space!\1\s*\)/);
You should use the += operator to add char to the current value of encrypted_text inside your new if statement.
const commentless_code = __helpers.python.removeComments(code);
const {block_body} = __helpers.python.getBlock(commentless_code, /if\s+char\s*==\s*("|')\s\3\s*/);
assert(block_body.match(/encrypted_text\s*\+=\s*char/));
Your code contains invalid syntax and/or invalid indentation.
({test: () => assert(true) })
--fcc-editable-region--
text = 'Hello World'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'
encrypted_text = ''
for char in text.lower():
if char == ' ':
print('space!')
index = alphabet.find(char)
new_index = index + shift
encrypted_text += alphabet[new_index]
print('char:', char, 'encrypted text:', encrypted_text)
--fcc-editable-region--