Question: Write a python code function to compute the power of a number using for loop. (Not using python function pow ()) 1. upload your python

Write a python code function to compute the power of a number using for loop. (Not using python function pow ()) 1. upload your python code to Lab#01 folder named Lab#01.py 2. output screen shot 3. Source and screen shot should be uploaded separately The Exponent calculation function takes two arguments, base and exponent, then calculated result return. You should test two different cases as follows: <> - Example 1 base: 3 exponent : 2 <> base => 3 exponent=> 2 base 0x20efa0a6970 exponent 0x20efa0a6950 3 ** 0 = 1 3 ** 1 = 3 <> Example 2 base => 4 exponent=> 6 <> base 0x2b9acef6990 exponent 0x2b9acef69d0 4 ** 0 = 1 4 ** 1 = 4 4 ** 2 = 16 4 ** 3 = 64 4 ** 4 = 256 4 ** 5 = 1024

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!