#Given 4 floating-point numbers. Use a string formatting expression with conversion specifiers to output their product
# And their average as integers(rounded) then as floating-point numbers

#Output each rounded integer using the following: 
#print (f'{your_value:.0f}')

#Output each floating-point value with three digits after the decimal point, which can be achieved as follows: 
#print (f' {your_value:.3f}')

# if the input is: 
# 8.3
# 10.4
# 5.0
# 4.8 

# The output is 
# 2072 7 
# 2071.680 7.125 

# Get the user input for num1-4 
num1 = float(input())
num2 = float(input())
num3 = float(input())
num4 = float(input())

#find the product of num1-4 
product = num1 * num2 * num3 * num4

#find the average (+) /4 num1 -4 
average = (num1 + num2 + num3 + num4) /4 

#Round the result 
print(f"{round(product)} {round(average)}")

#Output the floating-point value 
print('{product:.3f} {average:.3f}')

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: