Python for Data Analysis
Notice: we moved to https://sihan.hashnode.dev/
Pages
Home
Youtube Videos
Portfolio
About Sihan
Saturday, 8 May 2021
Declaring and using functions: list mean
def
mean
(
list
):
total =
0
for
i
in
list
:
total=total+i
mean = total/
len
(
list
)
return
mean
a = [
10
,
40
,
30
]
print
(mean(a))
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment