Answer to Question #292434 in Python for ymstr

Question #292434

4. Decimal x Decimal

by CodeChum Admin

Now that we're done with integers, we're moving on to decimals!


Instructions:

  1. Input three decimal numbers with only two decimal places in one line separated by spaces, store them inside variables.
  2. Multiply the 1st and 2nd decimal numbers, store the product.
  3. Divide the product of the 1st and 2nd decimal numbers with the 3rd decimal number, then print out the quotient with only two decimal places.

Input

A line containing three decimal numbers with two decimal places separated by a space.

1.53·2.25·1.23

Output

A line containing the result with two decimal places.

2.80




1
Expert's answer
2022-01-31T07:56:09-0500
string_series =input()
floats_list = [float(item) for item in string_series.split()]
number1=floats_list[0]
number2=floats_list[1]
number3=floats_list[2]
product=number1*number2
quotient=product/number3
print("{:0.2f}".format(quotient))

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS