Question: pytthon (syder) 5. Free Response: splitPower(x, n) [2pts] Write the function splitPower(x, n) where x and n are integers, and n is non-negative. This function

 pytthon (syder) 5. Free Response: splitPower(x, n) [2pts] Write the function
pytthon (syder)

5. Free Response: splitPower(x, n) [2pts] Write the function splitPower(x, n) where x and n are integers, and n is non-negative. This function removes the n rightmost digits of x, leaving or more leftmost digits. The function then returns the number formed by the leftmost digits raised to the power of the rightmost digits. For example, splitPower(23, 1) returns 8, because 2**3 == 8. Likewise, splitPower(123, 2) returns 1, because 1** 23 == 1. Note that splitPower(-902, 2) returns 81 because (-9)**2 == 81. Be careful with negative numbers

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!