Files
2024-01-26 17:06:19 -08:00

1.2 KiB

id, title, challengeType, dashedName
id title challengeType dashedName
65521fc818947e800bffe48a Step 27 20 step-27

--description--

Inside the for loop, before printing the current character, declare a variable called index and assign the value returned by alphabet.find(char) to this variable.

--hints--

You should declare a new variable named index at the beginning of your for loop.

const commentless_code = __helpers.python.removeComments(code);
const {block_body} = __helpers.python.getBlock(commentless_code, /for\s+char\s+in\s+text\s*/);
assert(block_body.match(/^\s*index\s*=/));

You should assign alphabet.find(char) to your new index variable.

const commentless_code = __helpers.python.removeComments(code);
const {block_body} = __helpers.python.getBlock(commentless_code, /for\s+char\s+in\s+text\s*/);
assert(block_body.match(/index\s*=\s*alphabet\.find\s*\(\s*char\s*\)\s*(#.*)?$/m));

Your code contains invalid syntax and/or invalid indentation.

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

--seed--

--seed-contents--

text = 'Hello World'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'
--fcc-editable-region--
for char in text:
    print(char)
--fcc-editable-region--