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
How to calculate 3 X (50 + 40) ÷ 5 on excel 2016
kozerog [31]

Answer:

I think this might help, don't know much of this

Explanation:

How do you calculate 3.5 increase in Excel?

How To Increase a Number By a Percentage. If want to calculate a percentage increase in Excel (i.e. increase a number by a specified percentage), this can be done by simply multiply the number by 1 + the percentage increase. - which gives the result 60.

8 0
3 years ago
Read 2 more answers
Why we use cluster computing and hadoop framework for big data sysetm​
Ber [7]

Answer:

Explanation:

Hadoop clusters can boost the processing speed of many big data analytics jobs, given their ability to break down large computational tasks into smaller tasks that can be run in a parallel, distributed fashion.

5 0
2 years ago
What does limited access to a document mean?
Vlad [161]

Answer:

D. It does not reflect any changes made in the document

Explanation:

A limited access is usually done by middle level and top level managers in an organisation to prevent other staff member to edit or make changes to confidential documents when they are out of the office, though the staff can read it, they can not make changes to it.

6 0
3 years ago
Read 2 more answers
What will be the output of the following lines of code and the user's response?
Arte-miy333 [17]

Answer:

The answer is C. 85

Explanation:

The int() function is usually used to turn a float, to an int<em>.</em> When you use the int() function, it just cuts of everything past the decimal. It doesn't round the float. Leaving you with the option C. 85

hope this helped you :D

6 0
2 years ago
____________________ is like a set of instructions that helps hardware process data into information.
Arte-miy333 [17]

Answer:

Program

Explanation:

Program is like a set of instructions that helps hardware process data into information.

Every hardware needs a program to process data into information.

For example take the example of a data processing software like MS Excel.

You open a spreadsheet and enter some data into your sheet. and then ask the program to do some calculations with this data and give you output results. The spreadsheet software does this processing in the background for you and provides you the results.

Without program a hardware doesn't know what to do with the data. Therefore, a program is like a instruction set that guides the hardware what to do with the data.

Note: The terms software and program are usually used together but there is a difference between software and program

A software is a generalized term and program is more like a specific term.

software can be made up of several different programs which performs many different tasks. On the other hand, a program only carry out a specific task or set of instructions.

3 0
3 years ago
Other questions:
  • Go to the Creamy Ice Corporation passage on the next page. Insert the trademark sign after the word “Corporation'' in the first
    9·1 answer
  • What does delegating access give someone the permission to do on behalf of the user? Choose two answers.
    5·1 answer
  • Blackbaud is a company that supplies services and software designed for nonprofit organizations. Which type of e-commerce websit
    8·1 answer
  • George is only familiar with VGA connector for monitors. What should you tell him are the main differences between VGA and DVI c
    8·1 answer
  • Refer to the exhibit. the gigabit interfaces on both routers have been configured with subinterface numbers that match the vlan
    11·1 answer
  • Which speaker port should you use when connecting a single speaker to a pc?
    6·1 answer
  • Which PowerPoint options can users customize?
    9·1 answer
  • Technician A says that high pressure in recycled refrigerant is only caused by air contamination. Technician B says that recycle
    15·1 answer
  • What is project management? A. Brainstorming ways to plan a project B. Executing, completing, and revising a project C. Managing
    10·1 answer
  • Explain the emerging trends in microcomputer technology in relation to size​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!