Question: Data Programming: PYTHON -Write a program that takes quarterly sales for an organization ( in thousands of dollars) over a year and calculates the total

Data Programming: PYTHON

-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.

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

-

Write a program that takes the time in military format ( e.g. 1 am is 0100 hours and 11 pm is 2300 hours). The program should display the appropriate message based on the entered time. Use the following table.

Time Message
between 5 am and 12 pm Good morning
between 12 pm and 4 pm Good afternoon
between 4 pm and 7 pm Good evening
between 7 pm and 5 am Good night

Output:

a) Good morning

b) Good afternoon

c) Good night

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!