Answer:
You can do it like this in Python.
- def product():
- ''' Finds the product of three numbers '''
- num1 = input("Enter first number: ")
- num2 = input("Enter second number: ")
- num3 = input("Enter third number: ")
- return float(num1) * float(num2) * float(num3)
If you have just integers and you are not expecting floating point numbers, you can simply do a type conversion to int.
product()
- >>> Enter first number: 3.5
- >>> Enter second number: 7
- >>> Enter third number: 6.96
- >>> 170.52