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

fix gcd #3

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

fix gcd #3

wants to merge 3 commits into from

Conversation

romatsp
Copy link

@romatsp romatsp commented Sep 28, 2018

Fixed GCD function

gcd.py Outdated
def gcd(a, b):
assert a <= 0 and b >= 0
def gcd(a: int, b: int): #1
assert a < 0 and b > 0 #2
Copy link
Contributor

Choose a reason for hiding this comment

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

In task I mentioned that "a" and "b" must be positive, in your case: "a" can be less and 0 is not included, that's incorrect for requirements that I wrote.

…is an

output, not a condition (assert <condition>, <error message>).
I did a lot of checks, but did not expect a<0. I will be more attentive.
(From the words of Google Translator - it's recorded correctly, I hope :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants