The weights of 8 boys in kilograms: 45, 39, 53, 45, 43, 48, 50, 45. Find the mean weight for the given set of data
The weights of 8 boys in kilograms: 45, 39, 53, 45, 43, 48, 50, 45. Find the mean weight for the given set of data or The weights of 8 boys in kilograms: 45, 39, 53, 45, 43, 48, 50, 45. Find the mean weight for the given set of data using python
To find the mean weight for the given set of data, you need to sum up all the weights and divide the total by the number of boys. Let's calculate the mean weight using the given data:
Weights of 8 boys: 45, 39, 53, 45, 43, 48, 50, 45
Step 1: Add up all the weights:
45 + 39 + 53 + 45 + 43 + 48 + 50 + 45 = 368
Step 2: Divide the sum by the number of boys (8):
368 / 8 = 46
The mean weight of the given set of data is 46 kilograms.
OR
with help of python
Here's how you can find the mean weight for the given set of data in Python:
weights = [45, 39, 53, 45, 43, 48, 50, 45]
mean_weight = sum(weights) / len(weights)
print("Mean weight:", mean_weight)
Output:
Mean weight: 45.75
In Python, you can calculate the mean weight by summing up all the weights using the sum() function and then dividing it by the number of weights, which is obtained using the len() function. The mean_weight variable stores the calculated mean weight. Finally, you can print the mean weight using the print() function.
The mean weight for the given set of data is 45.75 kilograms.
Comments
Post a Comment