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 4436
android x 1590
java x 1475
javascript x 1385
c x 903
c++ x 831
ruby-on-rails x 681
php x 678
python3 x 651
html x 631

© 2022 OneMinuteCode. All rights reserved.