12 ответов
+ 4
So you add all the numbers you got and divide by the number of numbers.
In Python you can get the number of elements in a list with the function len. You just take your list, let's say you call it my_list, and write:
len(my_list)
You get the number of elements in the list like this.
So probably now you get an idea how to tackle the problem...?
Now give it a try!
+ 3
HonFu is a good mentor. Patient and guiding instead of giving answer directly, 👏👏👏👏
+ 2
Let's see if he figures this out himself. :)
Good luck, Twinkle Tosse, keep us posted!
+ 1
How would you calculate an average of a few numbers in real life?
+ 1
By adding of two numbers and divide by two
+ 1
Add three numbers and divide by three
+ 1
Maybe you want to tell him the function to add numbers too?
0
Any answer
0
And if it's three numbers?
0
And if it's three numbers?
0
How can we find average of numbers given in list in python ??
0
sum(lst) / len(lst)