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
REY [17]
4 years ago
10

(Analyze scores) Write a program that reads an unspecified number of scores and determines how many scores are above or equal to

the average and how many scores are below the average. Enter a negative number to signify the end of the input. Assume that the maximum number of scores is 100.
Here is a sample run:Enter a new score or negative number to exit: 99.1Enter a new score or negative number to exit: 85.6Enter a new score or negative number to exit: -1Total scores entered: 2Average score: 92.35Number of scores above or equal to the average: 1Number of scores below the average: 1

Computers and Technology
1 answer:
Angelina_Jolie [31]4 years ago
7 0

Answer:

#section 1

ls = []  

while True:

   score = float(input('Enter a New score or negative number to exit: '))

   if score < 0:

       break

   else:

       ls.append(score)

   

#section 2

average = sum(ls)/len(ls)

a = [num for num in ls if num >= average]

print('Total Scores Entered: ',len(ls))

print('Average score entered is: ',average)

print('Number of scores above average is: ',len(a))

print('Number of scores below average is:', len(ls)-len(a))

Explanation:

The programming language used is python 3.

#section 1

In this section, an empty list is initialized to hold all the values that will be inputted.

A while loop created which prompts the user to enter an input until a   negative value is entered. This while loop always evaluates to be true until a value less than 0 allows it to break.

Finally, all the scores are appended to the list.

#section 2

In this section the code gets the average by dividing the sum by the number of items in the list.

A new list 'a' is created to hold all the values that are greater than or equal to the average.

Finally, the results are printed to the screen.

I have attached an image with the example stated in your question.

You might be interested in
The fill command try’s to fill or generate content for cells based on a ________.
natta225 [31]

Answer: Ctrl + R

Explanation:

Ctrl+ R is the shortcut for filling right, you will first highlight cells.

5 0
3 years ago
There are two cons to an OLTP database. Which of the following are a solution of these cons?​
Delicious77 [7]

Answer:

The answer is below

Explanation:

An OLTP (Online transaction processing) database is a database that allows for quick transaction processing. It involves inserting, deleting, updating data in the database.

OLTP has many drawbacks like if the system fails, all transactions are going to have problems. Also, since multiple users are allowed to access the data, it makes it prone to hackers.

The solution to the problems associated to the OLTP database is the OLAP (online analytical processing) database.

The OLAP systems allow users to analyze database information from multiple database systems at one time thereby allowing analysis for business decisions.

6 0
4 years ago
Modify an array's elements using other elements write a for loop that sets each array element in bonusscores to the sum of itsel
natali 33 [55]
<span>Assuming that the language is C++ and that the following variables exist: bonusscores is an array of some numeric type (float, double, int, etc). nent is an integer indicating how many elements are in bonusscores. Also assuming that the array is 0 based, so legal subscripts range from 0 to nent-1. // Code starts here for(int x = 0; x < (nent-1); ++x) { bonusscores[x] = bonusscores[x] + bonusscores[x+1]; } // Code ends here Thing to note, since the last element isn't modified, the range for the for loop is reduced by 1 so that every element to actually be modified is visited, but the last element isn't. And since each element after modification isn't needed for future modifications, it's safe to change them in situ.</span>
7 0
3 years ago
Consider the scenario below. Will the solution attempted by the technician fix the problem or make it worse? Defend your answer.
PSYCHO15rus [73]

Answer:

Answer is depend on situation.

Explanation: If data stored on individual computer not using server ,answer will be  To fix the problem, the technician installed new, larger hard drives on all the computers. But most the time if many computer in the network ,they have to share data and will need server to share data, Over 20 pc in the network can not use standard pc for share files need to have server so,need more info to provide proper answer

i hope i help you

4 0
3 years ago
You have just installed a new NIC in your PC to replace the old one that had started malfunctioning. What additional software mu
miskamm [114]

Answer:

The additional software that must be installed is a device driver.  

Explanation:

Device driver is a software program that is used to control a device connected to a computer.

If a user later buys a new type of device that the operating system did not recognize, new device driver will have to be installed just as in the given question when new NIC is installed. Device driver allows communication between hardware device and operating system.

So device driver will allow the OS to communicate with the new installed NIC.

4 0
3 years ago
Other questions:
  • Database designers typically do not add spaces in field names (LName), but can add details in the ________ field of the field pr
    9·1 answer
  • A _____ is a digital media file distributed over the Internet using syndication feeds for playback on mobile devices and persona
    6·1 answer
  • Hiding an object, such as a diary, to prevent others from finding it is an example of:______________.
    10·1 answer
  • The labor market shows the:
    11·1 answer
  • What type of wireless connection requires an unobstructed "line of sight" between transmitter and receiver?
    8·1 answer
  • Your ___ can provide hardware firewall protection for your home network where it connects to the ISP's network, just as ISP netw
    12·1 answer
  • Why use LinkedIn Sales Navigator?
    5·1 answer
  • You often travel away from the office. While traveling, you would like to use a modem on your laptop computer to connect directl
    5·1 answer
  • What is an html skeleton? If you know what it is can you write it for me?
    12·1 answer
  • Question # 9
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!