Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def student_marks(a):
- mean = 0
- exact_mean = []
- above_mean = []
- below_mean = []
- for key in a:
- mean= mean + a[key]
- mean = (int)(mean/len(a))
- for key in a:
- if (a[key]==mean):
- exact_mean.append(key)
- elif (a[key]>mean):
- above_mean.append(key)
- else:
- below_mean.append(key)
- for i in exact_mean:
- if i != None:
- print(i)
- for i in above_mean:
- if i != None:
- print(i)
- for i in below_mean:
- if i != None:
- print(i)
- marks = eval(input())
- student_marks(marks)
Add Comment
Please, Sign In to add comment