Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c) [10 pts] Write a code to compute and print the Median , Average and Mode of the marks between 0 and 100 (inclusively) after

image text in transcribed
c) [10 pts] Write a code to compute and print the Median , Average and Mode of the marks between 0 and 100 (inclusively) after rounding each mark to the nearest integer. Ensure notifying the user if there is no unique mode found, as the Mode in this exercise returns only the single most common mark in the list. For example, if the user enters 89.7, 120, -12, 90, 60.2 , then the output should be: The valid marks are: [90, 90, 60] Median is 90 ; Average is 80 ; Mode is 90 However, if the user enters 90.6, 70, 100, 40.4 , then the output should be: The valid marks are: [91, 70, 100, 40] Median is 80.5 ; Average is 75.25 ; No unique mode found Also, if the user enters 65, 65, 65, 35, 35, 35 , then the output should be: The valid marks are: [65, 65, 65, 35, 35, 35] Median is 50.0 ; Average is 50 ; No unique mode found Hint: Use the [statistics] (https://docs.python.org/3.7/library/statistics.html) module as it provides functions to calculate mathematical statistics of numeric data. [ ] : #INSERT YOUR ANSWER HERE

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Partial Differential Equations With Fourier Series And Boundary Value Problems

Authors: Nakhle H Asmar

1st Edition

0486820831, 9780486820835

More Books

Students also viewed these Mathematics questions