human
Euler 's Totient Function | Function to return gcd of a and b.
A simple method to evaluate Euler Totient Function.
Driver Code"
How can the above be solved in Python?
assistant
#Here is code to euler 's Totient Function and the other steps required.
 def gcd ( a , b ) :
	if ( a == 0 ) :
		return b
	return gcd ( b % a , a )
def phi ( n ) :
	result = 1
	for i in range ( 2 , n ) :
		if ( gcd ( i , n ) == 1 ) :
			result += 1
	return result
for n in range ( 1 , 11 ) :
	print ( " phi ( " , n , " ) ▁ = ▁ " , phi ( n ) , sep = " " )