Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update description for Step 1 of the Luhn Algorithm project #54733

Open
zairahira opened this issue May 10, 2024 · 6 comments · May be fixed by #54773
Open

Update description for Step 1 of the Luhn Algorithm project #54733

zairahira opened this issue May 10, 2024 · 6 comments · May be fixed by #54773
Labels
help wanted Open for all. You do not need permission to work on these. new python course scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc.

Comments

@zairahira
Copy link
Member

Describe the Issue

The main() function needs to elaborated. It is used through out in the curriculum and this is a good place to define what main() is intended for in Python.

The description should mention:

  • main() is the starting point of program execution.

Any other addition can be discussed in the discussion.

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-1

Your code


n/a

Expected behavior

see explanation above

Screenshots

No response

System

  • Device: [e.g. iPhone 6, Laptop]
  • OS: [e.g. iOS 14, Windows 10, Ubuntu 20.04]
  • Browser: [e.g. Chrome, Safari]
  • Version: [e.g. 22]

Additional context

No response

@zairahira zairahira added type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc. help wanted Open for all. You do not need permission to work on these. scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. new python course labels May 10, 2024
@MohamedRahimm
Copy link

Hi @zairahira ,

This is my first time contributing to an open-source project, so I want to clarify the issue. In addition to mentioning that main() is the starting point of program execution should the description also mention Python's unique approach, where the main() function isn't mandatory due to the name convention but including it provides context to those coming from languages where it is?

@zairahira
Copy link
Member Author

Hi @MohamedRahimm, this is the first time main() would be introduced in the curriculum. You can incorporate the concepts you mentioned above as long as the instruction is concise and not too wordy. You can also open a PR with the proposed changes and we'll suggest changes where needed. We look forward to your contribution 👍️

@MohamedRahimm
Copy link

Sorry for the repeated references I messed up quite a bit trying to create a pull request😓

@ilenia-magoni
Copy link
Contributor

main is not a specially named function tho, it's just used to match the __main__ special name. It will works exactly as well for any name of function.

Unless you mention the if statement for if __name__ == '__main__' I don't see any reason to give special attention to the main function

@MohamedRahimm
Copy link

I think mentioning if __name__ = 'main' is out of place since it's the first step and is unnecessary unless you export the module, to my knowledge. So the updated description would look like this:

Start by declaring a function called main, this will be the entry point of the program. Use the pass keyword to avoid an error

@zairahira
Copy link
Member Author

After reviewing the discussion, this updated description would be good to go:

In this project, you will implement the Luhn Algorithm. This algorithm is a formula to validate a variety of identification numbers.

Start by declaring a function called `main`, this will serve as the entry point of the program. Use the `pass` keyword to avoid an error.

MohamedRahimm added a commit to MohamedRahimm/freeCodeCamp that referenced this issue May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Open for all. You do not need permission to work on these. new python course scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc.
Projects
None yet
3 participants