Question: Write a PYTHON program that computes the Harmonic Mean of n numbers. Suppose the first number is represented by (n1), the second by (n2), and

Write a PYTHON program that computes the Harmonic Mean of n numbers. Suppose the first number is represented by (n1), the second by (n2), and so on. The Harmonic mean is Hm = n/(1/n1+ 1/n2 +...+ 1/nn) . Your program should ask the user to enter the value n and the numbers and print the result.

Desired output:

Enter the value of n: 5

Enter the value of n1 : 15

Enter the value of n2 : 12

Enter the value of n3 : 10

Enter the value of n4 : 10.5

Enter the value of n5 : 12.8

The Harmonic mean is 11.8102

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!