<prompt> Kutokana na integer n, kurudi kweli kama ni nguvu ya tatu. vinginevyo, kurudi uongo. Integer n ni nguvu ya tatu, kama kuna integer x kama kwamba n 3 x.  <response>: You can solve this problem using logarithm. Heres the code in Python:import mathdef isPowerOfThreen: int - bool: if n 0: return False x roundmath.logn, 3 return 3x nThe math.logn, 3 function returns the logarithm of n base 3, which gives us the exponent x in the equation n 3x. We round x to the nearest integer using the round function. Finally, we check if 3x is equal to n and return the result. 