Question 3: provide a Python program that checks if a given number…

Question Answered step-by-step Question 3: provide a Python program that checks if a given number… Question 3: provide a Python program that checks if a given number is a power of 3. Please note the question asks about power of 3 not just divisible by 3. Hint: consider a while loop and just think what are the conditions for the while loop. Question 4: provide  a Python function that calculates frequency of all elements in a given list (how many times an element shows up in the list). Test the function on the following list: [0, 3, 4, 4, 7, 9, 5, 2, 3, 1, 4, 0, 8, 4, 3, 3, 4, 4, 2, 4, 9, 6, 0, 9, 0, 7, 5, 5, 1, 9, 6, 6, 8, 4, 1, 2, 9, 9, 2, 9, 5, 5, 9, 5, 6, 5, 1, 7, 2, 2, 5, 4, 2, 8, 1, 3, 1, 5, 2, 1, 3, 7, 6, 0, 8, 3, 4, 3, 2, 1, 4, 2, 1, 7, 0, 6, 9, 1, 7, 3, 5, 9, 2, 7, 4, 7, 1, 1, 8, 4, 3, 9, 3, 5, 2, 5, 0, 6, 7, 1]  Computer Science Engineering & Technology Python Programming HAP 618 Share QuestionEmailCopy link Comments (0)