Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE READ! - All the outputs should change according to the entered values. - Outputs should exactly match mine. - ******NOT allowed to use the

PLEASE READ!

- All the outputs should change according to the entered values.

- Outputs should exactly match mine.

- ******NOT allowed to use the input function, if used, answer will be downvoted*******

- sys.argv instead of input function (thank you!)

Write a program that takes quarterly sales for an organization ( in thousands of dollars) over a year and calculates the total sales. The output should change according to the sales entered. Add try/except block as well as an indication of whether total sales are low (under $50,000), medium ($50K or higher and under $150K), or high ($150K or higher). Also, issue a warning message in the event that sales are under $20K. If the sales entered are non-numeric, use a try/except /else block to indicate that the application only takes numeric data as inputs.

Input:

a) python C:\Users eda\DataProgramming\M3\assign3-7.py 1000 2500 1750 10250

b) python C:\Users eda\DataProgramming\M3\assign3-7.py 1000 cat 1750 10250

c) python C:\Users eda\DataProgramming\M3\assign3-7.py 10000 17500 14750 10250

Output:

a) Quarterly sales: $1000, $2500, $1750, $10250

Total sales: $15500

Sales: low

Warning: Need to improve sales

b) All sales should be numeric.

c) Quarterly sales: $10000, $17500, $14750, $10250

Total sales: $52500

Sales: med

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

Select Healthcare Classification Systems And Databases

Authors: Katherine S. Rowell, Ann Cutrell

1st Edition

0615909760, 978-0615909769

More Books

Students also viewed these Databases questions

Question

Prove Theorem 7.1(b).

Answered: 1 week ago

Question

Is the information factually accurate?

Answered: 1 week ago

Question

What steps will Sara need to take to conduct a benefit audit?

Answered: 1 week ago