The Wayback Machine - https://web.archive.org/web/20201004114542/https://github.com/TheAlgorithms/Python/issues/2695
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

Add more solutions to Project Euler problems #2695

Open
aceking007 opened this issue Oct 3, 2020 · 4 comments
Open

Add more solutions to Project Euler problems #2695

aceking007 opened this issue Oct 3, 2020 · 4 comments

Comments

@aceking007
Copy link

@aceking007 aceking007 commented Oct 3, 2020

Project Euler has about 700 problems, but the current repository hosts solutions for only about 60-70 problems.
I'm willing to work on the issue and also if someone wants to help they can join in.
We can create guidelines on how many minimum solutions a PR should have to prevent spammy PRs with just one or two easy solutions. (open to discussion)

@dhruvmanila
Copy link
Member

@dhruvmanila dhruvmanila commented Oct 3, 2020

As of now, we are only accepting PRs with one algorithm in it as it is easier to review one file at a time.
Feel free to open PR for whichever problem you have solved provided the answer is correct.

Anyone reading this can join and open PRs as well. We accept multiple solutions to a problem as everyone has their own approach to problem-solving but it should be their own and unique compared to other solutions.

NOTE: Please give us time to review as there are so many to go through. If possible submit one PR at a time and when that is merged provided it passes all the automatic tests, you can submit another PR. Also, please read the contributing guidelines before opening a PR.

One step at a time

Please follow the points mentioned below regarding Project Euler solutions. This is done to maintain consistency throughout the directory and to run this script which checks all the solutions:

  • There should be a function called solution() which, when called without any arguments, returns the answer to the problem.
  • If you wish to include parameters for the solution() function then the default value for the parameters should be the question input so that when the function is called without any arguments, it returns the answer to the problem.

Example:

def solution():                               # function without any parameters
    # ... calculations ...
    return answer

# If we call this function without passing any arguments, it will return the answer
solution()  # -> answer

def solution(input: "default value"):         # function with parameters having default value
    # ... calculations ...
    return answer

# If we call this function without passing any arguments, it will return the answer
solution()  # -> answer
@RGarg2002
Copy link

@RGarg2002 RGarg2002 commented Oct 4, 2020

Where can I get the problems from?

@berry-thawson
Copy link

@berry-thawson berry-thawson commented Oct 4, 2020

https://projecteuler.net/
Hope this helps

@RGarg2002
Copy link

@RGarg2002 RGarg2002 commented Oct 4, 2020

Thanks it helped🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can’t perform that action at this time.