python array | Print the data values which are the above average. Email ThisBlogThis!Share to TwitterShare to Facebook Reactions: Python 1 Comment
def pavg(a,t):
ReplyDeleteadd=0
for i in range(0,t):
add=add+a[i]
avg=add/s
for i in range(0,t):
if a[i]>avg:
print a[i]
mylist=[43,54,32,44,55,32,54,23,54,12]
s=len(mylist)
pavg(mylist,s)
32
32
23
12