How do I find the mean by referring to each element of the data below and how do I find the mean as an object?

```
import numpy as np
x = np.array ([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])
print('x[0]=',x[0],'x[10]=',x[10])
```

2022-09-30 13:58

```
import numpy as np
x = np.array ([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])
# calculate the average of the elements by dividing them by the number
sum = 0
for num in x:
sum+=num
print(sum/len(x))
# Use average method as array object for numpy
print(np.average(x))
```

2022-09-30 13:58

Popular Tags

python x 4627
android x 1593
java x 1492
javascript x 1425
c x 924
c++ x 877
ruby-on-rails x 696
php x 692
python3 x 683
html x 656

© 2023 OneMinuteCode. All rights reserved.