1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
miskamm [114]
4 years ago
10

Design a program that asks the user to enter a store’s sales for each day of the week. The amounts should be stored in an array.

Use a loop to calculate the total sales for the week and display the result.
Need: variable lists, IPO Chart, pseudocode, Flowchart, and working Python code.
Lottery Number Generator

Design a program that generates a 7-digit lottery number. The program should have an Integer array with 7 elements. Write a loop that steps through the array, randomly generating a number in the range of 0 through 9 for each element. (Use the random function that was discussed in Chapter 6.) Then write another loop that displays the contents of the array.

Need: variable lists, IPO Chart, pseudocode, Flowchart, and working Python code.
Computers and Technology
1 answer:
sdas [7]4 years ago
8 0

Answer:

Program given below

Explanation:

Total Sales

Assign the values of the variable as “Enter the store sales for Sunday” in Sun

Assign the values of the variable as “Enter the store sales for Monday” in Mon

Assign the values of the variable as “Enter the store sales for Tuesday” in Tue

Assign the values of the variable as “Enter the store sales for Wednesday” in Wed

Assign the values of the variable as “Enter the store sales for Thursday” in Thu

Assign the values of the variable as “Enter the store sales for Friday” in Fri

Assign the values of the variable as “Enter the store sales for Saturday” in Sat

Assign the values for the variable in array as [Sun, Mon, Tue, Wed, Thu, Fri, Sat]

Initialize tot = 0

Use the loop for calculating the total sales for the week,

for total_sales in store_sales:

    tot += total_sales

then display the result as,    

print "\n Total week sales = %2.f " %tot

sun = int(input("\n Enter the store sales for Sunday: "))

mon = int(input("\n Enter the store sales for Monday: "))

tue = int(input("\n Enter the store sales for Tuesday: "))

wed = int(input("\n Enter the store sales for Wednesday: "))

thu = int(input("\n Enter the store sales for Thursday: "))

fri = int(input("\n Enter the store sales for Friday: "))

sat = int(input("\n Enter the store sales for Saturday: "))

store_sales = [sun, mon, tue, wed, thu, fri, sat]

tot = 0

for store_sale in store_sales:

tot += store_sale

print "\n Total Week Sales: %2.f" %tot

We will have the following output:

<u>OUTPUT </u>

<u> </u>Enter the store sales for Sunday: 45

Enter the store sales for Monday: 56

Enter the store sales for Tuesday: 89

Enter the store sales for Wednesday:78

Enter the store sales for Thursday: 45

Enter the store sales for Friday: 12

Enter the store sales for Saturday: 23

Total Week Sales: 348

You might be interested in
I just tested how resistant my skin is with a multimeter and I stuck the probe tips pretty hard into my left and right hand. The
Ronch [10]

Since the multimeter measured about 7 Megaohms for you with dry skin and 1.3 Megaohms for your brother. it can be said that it is high.

<h3>What does a multimeter measure?</h3>

A digital multimeter is known to be a kind of a test tool that is often used to measure a lot of  or two electrical values that are seen or known to be principally voltage (volts), current (amps) and that of resistance (ohms).

Note that t he conductivity of the skin is said to be one that variable from person to person, hence, Since the multimeter measured about 7 Megaohms for you with dry skin and 1.3 Megaohms for your brother. it can be said that it is high.

Learn more about Megaohms from

brainly.com/question/10426373

#SPJ1

6 0
2 years ago
You have a friend that says she is interested in going into web development. She is very knowledgeable in terms of technology an
Schach [20]

Answer:

She should be aware several social media spectators are going to watch her content. She will get exposed on the Internet.

Explanation:

She should be aware several social media spectators are going to watch her content. She will get exposed on the Internet.

She should think before saying anything as one of his fans may complaint about her content to the police if she makes a joke about shooting up a place.

She has to be careful with his words as this may lead to termination from the job.

4 0
3 years ago
Which change signaled a musical progression toward rock and roll?
postnew [5]
It is the inclusion of the bass section
7 0
4 years ago
If you could create a social network, what would it be like? What would make it so special about the others? (If you want you ca
patriot [66]
Be able to contact and connect with other users. be able to share what your doing.
7 0
4 years ago
What are examples of macro events related to a form? Check all that apply.
Westkost [7]

Answer:

A form is closed

A form is resized.

A form is opened

A user presses a key

A user moves the mouse

Explanation:

There are different events in a form, and we can use them in different situations like:

  • We can use On Resize to resize our form.
  • If we On Load the form will be displayed.
  • On Clicked, If there was a click in an object
  • On Unload to close the form.
  • On Mouse Enter and On Mouse Leave, in this case, the mouse enters or leaves the object.

6 0
4 years ago
Other questions:
  • What is an efficiency target? Give an example of setting an efficiency target
    11·1 answer
  • What is the function of the Status bar in Outlook 2010?
    9·1 answer
  • How to find determinant of ​
    15·1 answer
  • python Write a program that will take a file named Celsius.dat that contains a list of temperatures in Celsius (one per line), a
    9·1 answer
  • Is the following sentence true or false? During meiosis, the two alleles for each gene stay together. ______
    15·1 answer
  • Which statement is NOT true regarding regular expression quantifiers? Group of answer choices They act on the preceding pattern
    11·1 answer
  • If your organization hires a new employee, what would you do to create a user account in the Linux system and add the account to
    11·1 answer
  • Uuhdcnkhbbbbhbnbbbbnnnnnnnnnfddjkjfs
    14·1 answer
  • pLZ PLZ PLZ HELP I HAVE SO MANY MISSING ASSINMENTS. why is physical security so important and necessary for both personal users
    8·1 answer
  • What is the best way of farming exotics in destiny?
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!