Question: I need help writing this program in python. Write a function that will take in a list of integers and then output whether the list
Write a function that will take in a list of integers and then output whether the list is pairwise relatively prime. If the list is pairwise relatively prime, then the function will output "Pairwise Relatively Prime". Otherwise, it will output "Not Pairwise Relatively Prime" See Definition 4 of Section 4.3 of the Rosen "Discrete Mathematics" book for details on what pairwise relatively prime is. Function name should be relativelyPrime You can use the following: from math import gcd Examples: >>>relativelyPrime(132,11,29)) Pairwise Relatively Prime >>>relativelyPrime(132,11,29,44,8,1]) Not Pairwise Relatively Prime >>>relativelyPrime(I5,8]) Pairwise Relatively Prime" >>>relativelyPrime(I5,8,5]) Not Pairwise Relatively Prime >>> relativelyPrime([-2,4]) Not Pairwise Relatively Prime >>> relativelyPrime([-2,4,3]) Not Pairwise Relatively Prime
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
