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]
3 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]3 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
If all of Earth's history were squeezed into one 12-hour period, how long ago did Precambrian time end? How long did the Cenozoi
Jet001 [13]

Answer:

That it

Explanation:

There have been mass extinctions during the Cenozoic as there were during the Mesozoic and Paleozoic, but not as many animals and plants have disappeared. Finally, humanity appeared during the last two million years.The human lineage only diverged from our most recent common ancestor about 5 million years ago; less than half of 1% of that time, and modern Homo sapiens is only between 200,000 and 50,000 years old, depending on your definition.

7 0
3 years ago
A customer would like you to install a high-end video card suitable for gaming. Your installation and configuration SHOULD inclu
Snowcat [4.5K]

Answer: • Ensure that the video card is compatible with the expansion slot

• Install video drivers from CD and then install updated drivers from the internet

• Configure the PC to use the integrated graphics if available and needed

Explanation

Your question isn't complete as you didn't put the options but I got the options online and the correct answers have been provided.

The installation and configuration for the high-end video card suitable for gaming will include:

• Ensure that the video card is compatible with the expansion slot

• Install video drivers from CD and then install updated drivers from the internet

• Configure the PC to use the integrated graphics if available and needed

4 0
3 years ago
The natural language convention used to represent ip addresses is called the:
Katyanochek1 [597]

is there multiple choice options? we need those to be exact..

6 0
3 years ago
Write a function, named "wait_die_scheduler" that takes a list of actions, and returns a list of actions according to the follow
lidiya [134]

Answer:

See attached picture for complete code.

Explanation:

See attached picture.

4 0
3 years ago
Which one is the correct answer
STatiana [176]

the right anwser is d


3 0
3 years ago
Other questions:
  • Which of these is a preferred method for
    14·2 answers
  • )in the link based implementation of the ADT sorted list what is the worst case time efficiency of the remove method?
    7·1 answer
  • Which option in presentation software can you use to apply a “fly in” effect to the objects on a slide? A)flowchart B)shapes C)
    11·2 answers
  • Which technique helps you look confident as a speaker?
    15·1 answer
  • A _____ defines what must take place, not how it will be accomplished.​
    12·1 answer
  • What are data structures and algorithms? Why are they important to software developer?
    14·1 answer
  • Okay, guys, I know this one will be very hard however while trying to finish this assignment I got overwhelmed and lost by the s
    9·1 answer
  • The ability to understand a person's needs or intentions in the workplace is demonstrating
    5·1 answer
  • ¿ El Parque Fray y Jorge es un patrimonio Cultural/Natural o patrimonial de Chile ?
    14·1 answer
  • What does input allow a computer to do
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!