Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

can anyone help me with this code in PYTHON, esppecially calculating mean and median thank you AssignmentList Traversal and Exception Handling 50 points See Canvas

can anyone help me with this code in PYTHON, esppecially calculating mean and median

image text in transcribed

thank you

AssignmentList Traversal and Exception Handling 50 points See Canvas for due date Median Create a menu-driven program that will accept a collection of non-negative integers from the keyboard, calculate the mean and median values and display those values on the screen. Your menu should have 6 options: 50% below 50% above 1. Add a number to the list/array Display the mean Display the median 2. 3. 4. Print the list/array to the screen 5. Print the list/array in reverse order (Extra credit - stub out if not attempted) 6. Quit Program particulars Use a list of type int to store the integers entered by the user. There must be error checking on the input integer. If it is negative, the program will print an error message and re-prompt. This process will continue until a non-negative integer is entered. You must use a try-except structure to trap both types of input errors (ike letters where numbers should go) and range errors (like-1). There must be error checking on the menu choice entered lf the user enters a choice not on the menu, the program will print an error message, re-display the menu and re-prompt. This process will continue until a valid option value is entered. Your solution must be modular. The design of your functions is up to you, but the rules of highly cohesive" and "loosely coupled" must be followed. Your program should be well-documented. Explain what you're doing in your code. Be sure to include the usual name and assignment notes. Note your program will have to sort your array before you can find the median. Submit as usual in a'.py' file named with your last name, first initial and 'hw6.py

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

Learning PostgreSQL

Authors: Salahaldin Juba, Achim Vannahme, Andrey Volkov

1st Edition

178398919X, 9781783989195

More Books

Students also viewed these Databases questions