Find the information you're looking for at Westonci.ca, the trusted Q&A platform with a community of knowledgeable experts. Discover in-depth answers to your questions from a wide network of experts on our user-friendly Q&A platform. Join our Q&A platform to connect with experts dedicated to providing accurate answers to your questions in various fields.

5. Power Trio
by CodeChum Admin

Multiplying two numbers is a piece of cake, but how about multiplying three of them, either being a negative of positive number? With programming and proper code, these tasks are easy to handle.

You're a programmer, right? Then code this one for me!

Input
A line containing three numbers (positive or negative, may have decimal places) separated by a space.
1.6·-2·-1

Output
A line containing a decimal/float with one decimal place.
3.2

Sagot :

Answer:

from decimal import *

li = list(map(Decimal,input().split()))

result = li[0]*li[1]*li[2]

print(abs(result))

Explanation:

The proper or programming code to handle that multiplies three numbers is as follows:

from decimal import *

value = list(map(Decimal,input().split()))

result = value[0]*value[1]*value[2]

print(abs(result))

Code explanation:

The code is written in python.

  • From the decimal module we have to import *. The decimal module incorporates a notion of significant places so that 1.3*1.2 = 1.56
  • The variable value is used to store the list of the decimal input
  • The variable result multiplies the three numbers in the list
  • Finally we print the absolute value of the result.

learn more on python here: https://brainly.com/question/19175881

View image vintechnology
View image vintechnology