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
Vikki [24]
3 years ago
15

Write a program that will ask the user for a set of ten numbers. After all ten numbers have been entered, the program will displ

ay the largest and smallest numbers of the data set. The program will then prompt the user whether he/she would like to enter another set of data. When the user indicates he/she is finished entering data sets, the program will finally display the average largest number and the average smallest number for all sets entered.
Computers and Technology
1 answer:
muminat3 years ago
8 0

Answer:

In Python:

nums = []

larg= []

small = []

while True:

   for i in range(10):

       num = int(input(": "))

       nums.append(num)

   print("Smallest: "+str(min(nums))); print("Largest: "+str(max(nums)))

   larg.append(max(nums))

   small.append(min(nums))

   another = int(input("Press 1 to for another sets: "))

   nums.clear()

   if not another == 1:

       break

   

print("Average Large: "+str(sum(larg)/len(larg)))

print("Average Small: "+str(sum(small)/len(small)))

Explanation:

This initializes the list of input numbers

nums = []

This initializes the list of largest number of each input set

larg= []

This initializes the list of smallest number of each input set

small = []

This loop is repeated until, it is exited by the user

while True:

The following iteration is repeated 10 times

   for i in range(10):

Prompt the user for input

       num = int(input(": "))

Add input to list

       nums.append(num)

Check and print the smallest using min; Check and print the largest using max;

   print("Smallest: "+str(min(nums))); print("Largest: "+str(max(nums)))

Append the largest to larg list

   larg.append(max(nums))

Append the smallest to small list

   small.append(min(nums))

Prompt the user to enter another set of inputs

   another = int(input("Press 1 to for another sets: "))

Clear the input list

   nums.clear()

If user inputs anything other than 1, the loop is exited

<em>    if not another == 1:</em>

<em>        break</em>

Calculate and print the average of the set of large numbers using sum and len    

print("Average Large: "+str(sum(larg)/len(larg)))

Calculate and print the average of the set of smallest numbers using sum and len

print("Average Small: "+str(sum(small)/len(small)))

You might be interested in
How to beat level 50 in give up robot 2
LiRa [457]

Answer:

just follow the steps and and become tough calm but tough

3 0
3 years ago
An it department submits a purchase order to buy a new computer from a vendor. Which hardware lifecycle does this scenario belon
AnnZ [28]

Answer:

Purchase or Lease is the stage of the Hardware Lifecycle to which this scenario belongs to.

Explanation:

Stages of Hardware Lifecycle Management:

1. Plan

Plan is made to check which things are needed and will help us in short and long terms so, that it remains in budget and can give us more productivity.

2. Purchase or Lease

We do check whether we need to use the things for long term or short term. If long term we can buy it but, for short term we can always take it on lease.

3. Deploy & Install

New equipments are placed at required places for their usage.

4. Maintenance

We need to have maintenance service which are done by third-party companies so, that all equipments work smoothly.

5. Upgrade

We need our company to be efficient so, we do upgrade equipments like getting new version of it and to maintain that it work for long time.

6. Parts & Repair

If repairing of equipments are done it can serve for more longer time.

7. Extend

We can extend the equipments warranty period so, if any major component gets damaged it can get replaced or removed free of cost rather than spending extensive money.

8. Buyback or Trade In

We can sell the used equipments so, we can have extra money by which we have taken the work of equipment even and got price for it.

9. Dispose or Recycle

We should dispose or recycle after the time you realize it can't be used anymore or repairing it will be wastage of money. So, dispose or recycle it.

3 0
4 years ago
why are the ads you might see on tv between 8am and 10am usually not the same ads you would see between 8pm and 10pm?
sdas [7]

Answer:

THEY rotate.

Explanation:

6 0
3 years ago
Which of the following substances increases in quantity during repititive muscle contraction during oxygen deficti ?
tensa zangetsu [6.8K]

Answer:

Lactic acid

Explanation:

Lactic acid builds up during strenuous exercise with limited amounts of oxygen.

7 0
3 years ago
Large Format Camera holds:
Leviafan [203]
Film 4x5 because it is bigger than 120 mm because mm is 120 of 1000th
5 0
3 years ago
Other questions:
  • In order for an IT security framework to meet information assurance needs, the framework needs to include policies for several a
    13·1 answer
  • Can anyone help me with getting bash ubuntu on windows setup?
    15·1 answer
  • Prompt the user for a character and the height of a right triangle. Then, print a triangle of that height using the character en
    11·1 answer
  • What is an internt?​
    10·1 answer
  • The mouse pointer becomes different shapes depending on the pointer s location and locations you click on the screen. true false
    6·1 answer
  • When the amount of storage data is big, and we need the searching and insertion must be very fast, which kind of data structure
    9·1 answer
  • How do you change the number of rows and columns displayed for an embedded Excel object on a PowerPoint slide?
    8·1 answer
  • The process of preparing and setting up a software on a computer is called​
    15·1 answer
  • Wiliam would like to sort a list of items after the data is already entered
    7·2 answers
  • Match each role to the corresponding web development task.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!