Skip to content

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.

3 participants