Question: python code please 3. It's easy to use exponents in Python using the ** operator. For this problem, you will write your own exponent function

python code please

3. It's easy to use exponents in Python using the ** operator.

3. It's easy to use exponents in Python using the ** operator. For this problem, you will write your own exponent function called pow(base, ex) that returns the value of base raised to the power of ex. ex is a positive integer. You solution should use a while loop (and recursion if you want the practice -- do it twice). You might want to use the while loop solution to factorial(n) as a model to get you started. All of these should pass: assert pow(2,8) == 2**8 assert pow(3,4) == 3**4 Once you are done, update test_pow() with 2 more assert statements to make sure your code works.

Step by Step Solution

3.44 Rating (144 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

3 Python version 36 Python program to create and test the expone... View full answer

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 Programming Questions!