Question: Write a Python program using Python 3.6.2. The program should be saved as a text file with the extention '.py'. Write a function named isRelativelyPrime

Write a Python program using Python 3.6.2. The program should be saved as a text file with the extention '.py'.

Write a function named isRelativelyPrime that takes two integers as parameters and returns True if there is no common divisor other than 1 for the two integers, False otherwise.

IsRelativelyPrime(6,8) should return False as they have a common divisor 2.

IsRelativelyPrime(12,7) should return True as they have no common divisor other than 1.

Hint : Use the gcd function of math module.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!