about | help | code help+videos | done | prefs |
isPerfectPower
Complete the function that when passed an integer (say, n), returns True if it is a "perfect power", that is, there exist two integers, k and p, such that p > 1, and k to the power of p = n. Note: 0 and 1 are considered perfect powers since 0 to the power of any value is 0, and 1 to the power of any value is 1. isPerfectPower(6561) → true isPerfectPower(80) → false isPerfectPower(0) → true ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 4 Post-solution available
Copyright Nick Parlante 2017 - privacy