Problem

Write a function that takes two numbers as input parameters and return True or False depending on whether they are co-prime. Two numbers are said to be co-prime if they do not have any common divisor other than one.

def gcd(a, b) : while b != 0 : a, b = b, a % b return a def coprime(a, b) : return gcd(a, b) == 1 a = int(input('Enter any number: ')) b = int(input('Enter any number: ')) print(coprime(a, b))

Interaction

Enter any number: 5 Enter any number: 7 True Enter any number: 5 Enter any number: 15 False