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]
2 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:
muminat2 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
Which types of scenarios would the NETWORKDAYS function help calculate? Check all that apply.
inna [77]

Answer:

A. days of vacation time left

B. days of school left in the year

D. years of service someone performed

Explanation:

The NETWORKDAYS function is a built in excel function which makes it easy to calculate the number of days between two specified dates the start date and the end date, this function when applied excludes weekends from the days calculated and one has the opportunity of specifying certain holidays. With this function. The number of days till vacation, the number school days left. The NETWORKDAYS is a very versatile function.

7 0
2 years ago
How bridges are built over water
Black_prince [1.1K]
It’s all depending on what method
4 0
1 year ago
What has a code that is freely available for use or modification?
liq [111]

Answer:

Open source software

Explanation:

Open source software is exactly what you think it is, the code to compile the software and run it is available to the public for use or modification.

6 0
2 years ago
Shreya has combined all the cells in a single leftmost column in a table. Instead of identifying the category multiple times, sh
aleksklad [387]

The place where Shreya will find these options is option b: Design tab, Merge group.

<h3>What is the Design tab?</h3>

The Design tab is known to be one that is made up of table formatting, cell as well as the table borders.

It is one that has the features of arranging the table on the page, as well as the size of the table.

Hence, The place where Shreya will find these options is option b: Design tab, Merge group.

Learn more about Design tab from

brainly.com/question/2501083

#SPJ1

3 0
1 year ago
Which option would a computer engineer most likely create? A) a programming language to run a new software program B.) the part
Zolol [24]

pogram b

Explanation:

3 0
2 years ago
Other questions:
  • Which information technology job has the lowest predicted 10-year growth? computer programmer software developer computer suppor
    13·1 answer
  • The ____ shortcut keys remove character formatting. (points : 2) ctrl 0 (zero) ctrl i ctrl spacebar ctrl u
    8·2 answers
  • A ______ connection provides fast internet service and the ability to exchange large files. ​
    11·1 answer
  • You are a disgruntled employee with a master’s degree in computer sciences who was recently laid off from a major technology com
    11·1 answer
  • A slideshow that accompanies an oral report is known as what?
    6·1 answer
  • _____ consists of the instructions that direct the operation of the computer system and enable users to perform specific tasks,
    15·1 answer
  • I’m turning my Pinterest into a professional account what should be my user name please try to think of a good name and not just
    11·2 answers
  • How would you describe binary to someone ??<br> PLEASE ANSWER I WILL GIVE U BRAINLY!!
    15·2 answers
  • Use a spreadsheet to solve this business problem. The owners of an electronics store want to find which of their products makes
    6·1 answer
  • Would it be feasible to combine fixed length field and variable length field format in single disk
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!