Question: Recursive Programming in Python Write a Python program that repeatedly prompts your user for a number. Use a recursive function to calculate the product of

Recursive Programming in Python

Write a Python program that repeatedly prompts your user for a number.

Use a recursive function to calculate the product of that number times three

Display the product.

Select a sentinel value that allows your user to quit.

Do not use the multiplication operator (*) in solution

User Input: Recursive Function Returns:

-2 -6

-1 -3

0 0

1 3

2 6

3 9

4 12

Hint: Think of multiplication as a series of addition

Recursive Function

User Inputs: 1 2

Performs: 3 3+3

Returns 3 6

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!