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
(Drag each tile to the correct box)While surfing online, Patricia first checks her email and reads the latest messages. She then
Marizza181 [45]

Answer:

When Patricia checks her email use:

POP3

TCP

IP

When Patricia brows a website and log in to post a comment use:

HTTP

TCP

IP

LDAP

Explanation:

Email protocol

Patricia starts to check her email, the email application uses the protocol POP3.

The protocol TCP makes a connection with the server and transport the data.

Patricia receives her emails with the protocol IP on her computer.

Website protocol

Patricia started to surf and the protocol HTTP makes a connection with the internet.

The protocol TCP makes a connection with the server and transport the data.

With the protocol IP, she receives the website data.

With the protocol LDAP, Patricia makes a login to post the comment.

6 0
3 years ago
300134223+304532264440=
sweet [91]

Answer:

304,832,398,663

hope it helps

3 0
3 years ago
Read 2 more answers
Hat are three machines or devices that depend on gravity to work?
jonny [76]
Some devices that depend on gravity to function include scales, showers, and satellites, to list a few.
6 0
3 years ago
Hi weegy, what is the latest android os?
KatRina [158]
<span>The newest android os is:
Android 7.0 Nougat

</span>
7 0
2 years ago
For this exercise, you are going to create a part of an Animal hierarchy. Unlike some of our examples and the previous exercises
kati45 [8]

Answer:

vehicle super class 9.1.4

Explanation:

So you need to create a super class containig all the animals use the class above for referance

5 0
3 years ago
Other questions:
  • When reading a ____ language, we use our understanding of the richness of the language's vocabulary to extract the meaning. geop
    10·1 answer
  • The Security Development Life Cycle (SDLC) is a general methodology for the design and implementation of an information system.
    5·1 answer
  • Write the definition of a function half , which receives an integer parameter and returns an integer that is half the value of t
    7·1 answer
  • Which is a copyright
    13·2 answers
  • How many generations of computer languages have there been since the middle of the 20th century?
    10·1 answer
  • After a suspected identity fraud case has been resolved, you should:
    10·2 answers
  • What is episodic memory? knowledge about words, concepts, and language-based knowledge and facts information about events we hav
    10·1 answer
  • Many companies use telephone numbers like 555-GET-Food so the number is easier for their customers to remember. On a standard te
    6·2 answers
  • Create a text file named employee.dat containing the following data: b. Write a C++ program to read the employee.dat file create
    6·1 answer
  • Describe five examples of civil engineering projects.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!