Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need the code for this in Python Total Sales (10 points) Write a program that stores the days of the week in a tuple.

I need the code for this in Python

Total Sales (10 points)

Write a program that stores the days of the week in a tuple. The program should use a loop to

prompt the user to enter the retail stores sales for a week. The data should be stored in a list

and use list functions to:

calculate the total sales of the week

indicate the minimum and maximum sales amount

Use input validation to ensure that entered values are greater than or equal to 0.

Make sure the currency is formatted appropriately (i.e. use two decimal places, as well as

comma separation)

Sample output:

Enter the sales for Sunday: 560

Enter the sales for Monday: -670

The input was invalid. Re-enter the sales for Monday: 670

Enter the sales for Tuesday: 1256

Enter the sales for Wednesday: 3010

Enter the sales for Thursday: 2050

Enter the sales for Friday: -947

The input was invalid. Re-enter the sales for Friday: 947

Enter the sales for Saturday: 1589

The total sales are: $10,082.00

The minimum sale amount was: $560.00

The maximum sale amount was: $3,010.00

Tip:

Make sure to reference the appropriate day in the tuple when you request your input. String

concatenation can help you add the value in the tuple to your input string.

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

Database Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

3rd Edition

0760049041, 978-0760049044

More Books

Students also viewed these Databases questions

Question

an example of a situation where using AD would be a better choice

Answered: 1 week ago