Skip to content
Please note that GitHub no longer supports your web browser.

We recommend upgrading to the latest Google Chrome or Firefox.

Learn more
Permalink
Browse files

Rename GCD File (#1354)

  • Loading branch information...
AliabbasMerchant authored and AnupKumarPanwar committed Oct 14, 2019
1 parent 67291a5 commit b190c8f629d1fb8371fb9ea434d986a843b2ecab
Showing with 3 additions and 3 deletions.
  1. +3 −3 maths/{greater_common_divisor.py → greatest_common_divisor.py}
@@ -1,12 +1,12 @@
"""
Greater Common Divisor.
Greatest Common Divisor.
Wikipedia reference: https://en.wikipedia.org/wiki/Greatest_common_divisor
"""


def gcd(a, b):
"""Calculate Greater Common Divisor (GCD)."""
"""Calculate Greatest Common Divisor (GCD)."""
return b if a == 0 else gcd(b % a, a)


@@ -16,9 +16,9 @@ def main():
nums = input("Enter two Integers separated by comma (,): ").split(",")
num_1 = int(nums[0])
num_2 = int(nums[1])
print(f"gcd({num_1}, {num_2}) = {gcd(num_1, num_2)}")
except (IndexError, UnboundLocalError, ValueError):
print("Wrong Input")
print(f"gcd({num_1}, {num_2}) = {gcd(num_1, num_2)}")


if __name__ == "__main__":

1 comment on commit b190c8f

@CrisDong

This comment has been minimized.

Copy link

commented on b190c8f Oct 15, 2019

good

Please sign in to comment.
You can’t perform that action at this time.