6,599 views
27 votes
27 votes
Write a function named print_product that accepts three numbers as parameters and prints the product. First, write the print_product function. Then, prompt the user for three inputs, and call your print_product function on those inputs.

Sample Run

Enter the 1st number: 11

Enter the 2nd number: 9

Enter the 3rd number: 8

The product: 792

*Programming language is Python

User Preets
by
2.9k points

1 Answer

15 votes
15 votes

Answer:

# Define functions

def print_product(num1,num2,num3):

print ("The product: ",num1*num2*num3)

num1 =int(input ("Enter the 1st number: "))

num2 =int(input ("Enter the 2nd number: "))

num3 =int(input ("Enter the 3rd number:" ))

print_product(num1,num2,num3)

Step-by-step explanation:

User Praveen Rawat
by
2.7k points