Programming Examples

Python program to obtain the marks in computer of some student and find mean median and mode


mean median and mode in  python

The Computer marks obtained by some students are given below:

89,91,96,94,96,88,91,92,95,99,91,97,91

Write a python code to calculate and display mean, median and mode.

import statistics
mn=statistics.mean([89,91,96,94,96,88,91,92,95,99,91,97,91])
mid=statistics.median([89,91,96,94,96,88,91,92,95,99,91,97,91])
md=statistics.mode([89,91,96,94,96,88,91,92,95,99,91,97,91])
print("Mean ",mn)
print("Median ",mid)
print("Mode ",md)
Output/ Explanation:


Latest Current Affairs 2024 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad