Back to Freecodecamp

Step 20

curriculum/challenges/english/blocks/learn-string-manipulation-by-building-a-cipher/659530ca823d6c47f61daa8a.md

latest583 B
Original Source

--description--

Print your shifted variable.

--hints--

You should print your shifted variable. Pay attention to place the function call at the beginning of the line.

js
assert.match(code, /^print\s*\(\s*shifted\s*\)/m)

Your code contains invalid syntax and/or invalid indentation.

js
({test: () => assert(true) })

--seed--

--seed-contents--

py
--fcc-editable-region--
text = 'Hello World'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'
index = alphabet.find(text[0].lower())
print(index)
shifted = alphabet[index]
--fcc-editable-region--