Respuesta :
Following are the correct python code to this question:
Program Explanation:
- In the python program four variable "n1, n2, n3, and n4" is defined, in which we input method is used that input value from the user end.
- In this, we use the float method, which converts all the input values into a float value.
- In the next step, two variables "average and product" are defined, which calculate all input numbers product, average, and hold value in its variable.
- In the last step, a print method is used, that prints its round and format method value.
Program:
n1 = float(input('Input first number: '))#input first number
n2 = float(input('Input second number: '))#input second number
n3 = float(input('Input third number: '))#input third number
n4 = float(input('Input fourth number: '))#input fourth number
average = (n1+n2+n3+n4)/4 #calculate input number average
product = n1*n2*n3*n4 # calculate input number product
print('product: {:.0f} average: {:.0f}'.format(round(product),round(average))) #print product and average using round function
print('product: {:.3f} average: {:.3f}'.format(product,average)) #print product and average value
Output:
Please find the attachment.
Learn more:
brainly.com/question/14689516
