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

Create sol1.py #7970

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Create sol1.py #7970

wants to merge 3 commits into from

Conversation

SandersLin
Copy link
Contributor

@SandersLin SandersLin commented Nov 6, 2022

proposed solution : generate all primitive pythagorean triples and check if it satisfies constraints in problem statement

Describe your change:

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Documentation change?

proposed solution : generate all primitive pythagorean triples and check if it satisfies constraints in problem statement
@SandersLin SandersLin requested a review from dhruvmanila as a code owner Nov 6, 2022
@algorithms-keeper algorithms-keeper bot added require tests Tests [doctest/unittest/pytest] are required awaiting reviews This PR is ready to be reviewed. labels Nov 6, 2022
Copy link

@algorithms-keeper algorithms-keeper bot left a comment

Click here to look at the relevant links ⬇️

🔗 Relevant Links

Repository:

Python:

Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.

algorithms-keeper commands and options

algorithms-keeper actions can be triggered by commenting on this PR:

  • @algorithms-keeper review to trigger the checks for only added pull request files
  • @algorithms-keeper review-all to trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.

NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.

"""
import math

def solution(number: int = 1000000000) -> int:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As there is no test file in this pull request nor any test function or class in the file project_euler/problem_094/sol1.py, please provide doctest for the function solution

Copy link

@algorithms-keeper algorithms-keeper bot left a comment

Click here to look at the relevant links ⬇️

🔗 Relevant Links

Repository:

Python:

Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.

algorithms-keeper commands and options

algorithms-keeper actions can be triggered by commenting on this PR:

  • @algorithms-keeper review to trigger the checks for only added pull request files
  • @algorithms-keeper review-all to trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.

NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.

"""
import math

def solution(number: int = 1000000000) -> int:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As there is no test file in this pull request nor any test function or class in the file project_euler/problem_094/sol1.py, please provide doctest for the function solution

Copy link

@algorithms-keeper algorithms-keeper bot left a comment

Click here to look at the relevant links ⬇️

🔗 Relevant Links

Repository:

Python:

Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.

algorithms-keeper commands and options

algorithms-keeper actions can be triggered by commenting on this PR:

  • @algorithms-keeper review to trigger the checks for only added pull request files
  • @algorithms-keeper review-all to trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.

NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.

import math


def solution(number: int = 1000000000) -> int:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As there is no test file in this pull request nor any test function or class in the file project_euler/problem_094/sol1.py, please provide doctest for the function solution

@algorithms-keeper algorithms-keeper bot added the tests are failing Do not merge until tests pass label Nov 6, 2022
total = 0
for a in range(1, int(math.sqrt(number // 4))):
for b in range(1, a):
# generate all primitive pythagorean triples and check if it satisfies constraints
Copy link
Member

@cclauss cclauss Nov 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

project_euler/problem_094/sol1.py:18:89: E501 line too long (94 > 88 characters)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting reviews This PR is ready to be reviewed. require tests Tests [doctest/unittest/pytest] are required tests are failing Do not merge until tests pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants