Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Do not Use np or numpy please solve and get a working code please write a working code 1. (30 pts) Create a Python program

Do not Use np or numpy please solve and get a working codeimage text in transcribed please write a working code

1. (30 pts) Create a Python program that finds the maximum, minimum, mean, mode, and median of a list, tuple or matrix and prints the results in a formatted output like: A is a matrix: Maximum =x Minimum =y Mean = z.zzz Mode =a Median =b A is a list: Maximum =x Minimum =y Mean = z.zzz Mode =a Median =b A is a tuple: Maximum =x Minimum =y Mean = z.zzz Mode =a Median =b Your program must consist of a function: def analyze (A) : where A is either a list, tuple or matrix and returns the results as a tuple (e.g., return ("tuple", max, min, mean, mode, med)), and a function def main () : that calls analyze with first a 10x10 matrix of numbers, then a list of 100 numbers, and finally a tuple of 100 numbers. In each case, the numbers should be randomly chosen between 1 and 100 . You must also call main() like: if main()name== "_main__": \# prevents call to main if imported

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

Spomenik Monument Database

Authors: Donald Niebyl, FUEL, Damon Murray, Stephen Sorrell

1st Edition

0995745536, 978-0995745537

More Books

Students also viewed these Databases questions

Question

Describe the basic structure of a union.

Answered: 1 week ago