Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Filename: assign 3 - 5 . py Define calstats function that calculates some basic statistics from a set of sales. This function takes the five

Filename:
assign3-5.py
Define calstats function that calculates some basic statistics from a set of sales. This function takes the five sales as parameters, calculates the min, max, range (the difference between max and min), and average, and prints the output as shown below. You can use min and max function or if/else to find the minimum and maximum values.
Write a program that takes the 5 sales, finds the basic statistic info using the calcstats function. Before calling your function, ensure that all inputs are entered as numbers. In addition, make sure that the correct number of arguments are provided (there should be 5 inputs).
Input:
Output:
a) Min: 50
Max: 600
Range: 550
Average: 250.0
b) The wrong number of sales provided.
c) All inputs should be numeric.
image text in transcribed

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

More Books

Students also viewed these Databases questions