Back to Freecodecamp

Step 2

curriculum/challenges/english/blocks/learn-how-to-work-with-numbers-and-strings-by-implementing-the-luhn-algorithm/656877c202f44995ed952608.md

latest906 B
Original Source

--description--

Replace the pass statement with a variable named card_number and a value of '4111-1111-4555-1142'.

--hints--

You should have card_number = '4111-1111-4555-1142' within the main function.

js
({
    test: () => {
        const transformedCode = code.replace(/\r/g, "");
        const main = __helpers.python.getDef("\n" + transformedCode, "main");
        const { function_body } = main;

        assert.match(function_body, / +card_number\s*=\s*('|")4111-1111-4555-1142\1/);
    }
})

You should not have a pass in your code.

js
({
    test: () => {
        const transformedCode = code.replace(/\r/g, "");
        const no_comments = __helpers.python.removeComments(transformedCode);
        assert.notInclude(no_comments, "pass");
    }
})

--seed--

--seed-contents--

py
--fcc-editable-region--
def main():
    pass

--fcc-editable-region--