Question: Given a positive integer number ( < = 3 1 8 = 3 8 7 4 2 0 4 8 9 ) , write a
Given a positive integer number write a Python function named ispowerofthree to return whether the number is an integer power of or not. Try doing this using a single line of code without using a loop or math module.
For example, your call, ispowerofthree must return True because
Test your function in your main program for the numbers and
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
