GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing www.geeksforgeeks.org — Python | math.gcd() function - GeeksforGeeks Python | math.gcd() functionLast Updated : 20 Feb, 2023 In Python, math module contains a number of mathematical operations, which can be performed with ease using the module. math.gcd() function compute the greatest common divisor of 2 numbers mentioned in its arguments.
Code #1:
Output:
The gcd of 60 and 48 is : 12 Code #2:
Output:
math.gcd(44, 12) : 4 math.gcd(69, 23) : 5 Code #3: Explaining Exception.
Output: The gcd of 0 and 0 is : 0 The gcd of a and 13 is : TypeError: 'str' object cannot be interpreted as an integer Comment Explore |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |