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
If you see ________________________ in a cell, it means the column is not wide enough to display the cell content. Select one: a
snow_lady [41]

the answer is c, ######

4 0
3 years ago
How to revert a dismissed javascript popup alert box in chrome?
xeze [42]
When Google Chrome blocks pop-ups for you, the blocked pop-up alert icon <span>appears in the address bar. If you click on the icon, you can see the pop-ups that have been blocked for that page. If you'd like to allow pop-ups for that specific site:</span><span><span><span>
1. Click the pop-up alert icon  (in the address bar).</span>
</span><span>2. Click the link for the pop-up you'd like to see.
</span><span>3. To always see pop-ups for the site, select "Always show pop-ups from [site]." 

</span></span><span>If you'd like to proactively allow pop-ups for specific sites:
</span><span><span><span>1. Click the Chrome menu   in the top right hand corner of your browser.</span>
</span><span><span>2. Select Settings.</span>
</span><span><span>3. Click Show advanced settings</span>
</span><span><span>4. Under the "Privacy" section, click the Content settings button.</span>
</span><span>5. In the "Pop-ups" section, select "Do not allow any site to show pop-ups." 
</span>6. Click the 'Manage exceptions' button.
<span>7. Type in the url of the site that you'd like to allow pop-ups from.</span></span>
5 0
3 years ago
Write a while loop that continues to increment uservalue by 5 as long as uservalue is less than 0.
yan [13]

Using the knowledge in computational language in mathlab it is possible to write a code that while loop that continues to increment uservalue by 5 as long as uservalue is less than 0.

<h3>Writting the code:</h3>

<em>function </em><em>userValue </em><em>= IncreaseValue(userValue)</em>

<em>while(userValue<0)</em>

<em>userValue = </em><em>userValue</em><em>+5;</em>

<em>end</em>

<em>end</em>

<h3>How to run a code in MATLAB?</h3>

To run: If inside the Editor window: on the toolbar choose the Run icon; or in the Debug menu choose the Run option; or press F5. If the file is saved in memory, just type its name in the command window.

See more about mathlab at brainly.com/question/12975450

#SPJ1

7 0
1 year ago
Finish the statement below to correctly describe the Defense Enrollment Eligibility Reporting System (DEERS). DEERS is a central
WITCHER [35]

Answer:  A- the antlers and horns are structural adaptations. The fighting is a behavioral adaptation.

Antlers and horns are physical adaptations that some mammals have acquired over time. However, fighting is not a physical feature but a behavioral adaptation used to beat other males during mating season.

Explanation:

5 0
3 years ago
HELP !!! Prompt <br> What is formatting text?
Svetach [21]

Answer:

Formatting text is how something is specifically layed out. Specific style.

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • peter has recently bought a media player and a digital camera. he wants to buy a memory card for these devices. which memory dev
    11·1 answer
  • To name a computed field, follow the computation with the word ____ and then the name you wish to assign to the field
    8·1 answer
  • Fill in the blank
    11·1 answer
  • Write down the pseudo code of a program that calculates the Body Mass Index (BMI) of
    9·1 answer
  • If you press the key corresponding to letter A on the keyboard, what process is carried out inside the CPU to display the letter
    10·1 answer
  • Think about some of the most memorable and forgettable games ever created. They can be games that were
    15·1 answer
  • Amazon Web Services and Microsoft Azure are some of the most widely used _______.
    7·1 answer
  • How many dog breed are there
    9·2 answers
  • The sun emits invisible _____&gt; A) electromagnetic waves B) Waves C) Radiation D) Wavelength E) Ultraviolet Light
    8·1 answer
  • Who is on ig and would like to be friends?​
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!