This assignment requires one file containing a main


This assignment requires one file containing a main function and a recursive function named power.

In main:

prompt the user to enter an integer for the base of the power.

prompt the user for an integer for the exponent of the power.

call the power function and print its returned value.

The recursive power function, power(base,exponent), must recursively calculate the value of the power and then return it.

SAMPLE OUTPUT

Enter an integer for the base: 2

Enter an integer for the exponent: 5

2 to the power 5 equals 32

SAMPLE OUTPUT

Enter an integer for the base: 3

Enter an integer for the exponent: 4

3 to the power 4 equals 81

Solution Preview :

Prepared by a verified Expert
Python Programming: This assignment requires one file containing a main
Reference No:- TGS01124795

Now Priced at $10 (50% Discount)

Recommended (93%)

Rated (4.5/5)