Question: please read the question and follow the examples please and don't use any regular expressions. Write a python function that takes a positive integer n
Write a python function that takes a positive integer n as an argument. This function will return the number of positive integers less than n that are co-prime to n. Co-prime Numbers: Two numbers are coprime to each other if they don't have any common divisor except 1. Sample Input 1: 1 Sample Output 1: 0 Reason: Since 1 is the smallest positive integer, there exists no positive integer that is less than and coprime to 1. Sample Input 2: 2 Sample Output 2: 1 Reason: Only 1 doesn't share any common divisor (except 1 itself) with 2. Also, 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
