freeCodeCamp / freeCodeCamp

freeCodeCamp.org's open-source codebase and curriculum. Learn to code for free.
http://contribute.freecodecamp.org/intro
BSD 3-Clause "New" or "Revised" License
401.2k stars 37.08k forks source link

Implementing the Luhn Algorithm - Step-23 - connecting reversed card number to `card_number_reversed` #55669

Open luojiyin1987 opened 1 month ago

luojiyin1987 commented 1 month ago

Describe the Issue

at tips

Step 23
Create a variable even_digits and assign it the even digits of the reversed card number.

reversed card number is hard to know it is var card_number_reversed.

It sholud be : Create a variable even_digits and assign it the even digits of the variable card_number_reversed

Affected Page

https://www.freecodecamp.org/learn/scientific-computing-with-python/learn-how-to-work-with-numbers-and-strings-by-implementing-the-luhn-algorithm/step-23

Your code

even_digits = card_number_reversed[1::2]

Expected behavior

It should easy to get info

Screenshots

No response

System

OS: Windows 10

Additional context

No response

naomi-lgbt commented 1 month ago

The purpose of instructions like this is to get learners to reflect on the code they are writing.

There are quite a few steps that explain how to reverse a string and ultimately assign it to the card_number_reversed variable, so this step encourages you to recall the code you wrote.

The hints (re: tests) for this challenge clarify what code you are specifically supposed to write. I'm not sure there's anything to fix here.