Question: USE PYTHON 3 ONLY! Create a program which includes a recursive function. Name the file you create 228.py The function you need to write is

USE PYTHON 3 ONLY!

Create a program which includes a recursive function. Name the file you create 228.py

The function you need to write is power(x, y) which returns xy. This function needs to be implemented in a recursive way. Complete with a base case and recursive call. Just like most recursive functions you will need a conditional statement to recognize the base case.

You also need to create a main function. This main function should ask the user for two numbers to be used in the power(x, y) function.

Make sure to turn in your resulting file.

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!