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
While software vendors generally provide evaluation or demonstration copies of their products, hardware vendors never provide ev
meriva

Answer:

False

Explanation:

Even with the expenses of hardware, hardware vendor still provide evaluation or demonstration copies of their products just like software vendors but not as often.

7 0
2 years ago
Apart from the OOPs concepts learned in this lesson, identify additional concepts and write an essay on their functions. Explain
patriot [66]

Explanation:

Object Oriented Programming (OOPS or OOPS for Object Oriented Programming System) is the most widely used programming paradigm today. While most of the popular programming languages are multi-paradigm, the support to object-oriented programming is fundamental for large projects. Of course OOP has its share of critics. Nowadays functional programming seems the new trendy approach. Still, criticism is due mostly to misuse of OOP.

6 0
2 years ago
software that instructs the computer how to run applications and controls the display/keyboard is known as the
OverLord2011 [107]
<span>Operating System is the software that gives the computer instructions on how to run applications. It is considered the most important program that runs on a computer because it manages all the hardware and software on it. It also controls the display/keyboard. </span>
4 0
3 years ago
Each web site contains a(n) ____ page, which is the first document users see when they access the site.
katrin2010 [14]
Home is the answer. Hope this helps. :)
7 0
3 years ago
Many advertisers are now introducing video ad campaigns that stretch across multiple viewing​ platforms, such as traditional tel
Evgen [1.6K]
The term that best fits the blank provided is DIGITAL VIDEO AD CONVERGENCE. The concept that is being described above is what we call the digital video ad convergence and this covers different types of media platforms as a way to introduce or advertise a product or a service.
8 0
3 years ago
Other questions:
  • What will be the output of “AAAAMMMMMHHHVV” using a file compression technique?
    9·2 answers
  • Need help this will affect my final grade in technology and the dead line has passed!!!
    11·1 answer
  • What is key for evaluating internal controls such as human resources, logistics, information technology, risk, legal, marketing
    11·1 answer
  • What is the difference between dsl and dial up?
    14·1 answer
  • Write a program to read from std_info.txt.
    11·1 answer
  • What is the<br> binary code<br> for<br> "DMS"?
    8·1 answer
  • What is computer software​
    9·1 answer
  • One rule in the Java programming language is that you have to place a semicolon at the end of each statement. What is this rule
    10·2 answers
  • How to install an older version of prettier on yarn
    9·1 answer
  • To read encrypted data, the recipient must decipher it into a readable form. What is the term for this process?.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!