Recursion · 7 / 18 Exercise Medium

Create a recursive function to multiply

Objective

Create a Python program with a recursive function called multiply() that receives two integers entered by the user and returns the result of multiplying them.

Instructions

  • Ask the user for two integers.
  • Implement a recursive function called multiply that receives both numbers and returns their product (use additions).
  • Print the result of the multiplication on the screen.
Input
4
4
Output
16

Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.

Start exercise