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]
3 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]3 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
Two strategies for keeping your files in sync
zlopas [31]

Answer:

1. MS Cloud

2. G Drive

Explanation:

5 0
3 years ago
Write Python code to save the data to a MongoDB collection:Import json module to parse JSON dataImport MongoClient from pymongo
Zigmanuir [339]

Answer:

Explanation:

The objective of this task is to compute a program that involves the usage of Python code to save the data to MongoDB and to query  the database.

Due to the error that occur which makes me to be unable to submit this answer, I've created a word document instead and the attached file can be found below.

Thanks!

Download docx
8 0
3 years ago
Supposethatyoubet$5oneachofasequenceof50independentfairgames. Usethecentrallimittheorem to approximate the probability that you
lions [1.4K]

Answer:

0.119

Explanation:

50 independent fair games

Mean will be 50/2 = 25

Standard deviation of the loosing probability is :

\sqrt{50*0.5*0.5} * 10 = 33.536

we have to loose 33 times out of 50 games.

To find the approximate probability we use z- value table.

z value =  \frac{33-25}{3.35}

z - value = 2.2659

Looking at the z-value table we get 0.119.

8 0
3 years ago
An operating system can be categorized according to: question 1 options:
9966 [12]

Answer:

An operating system can be categorized according to both the given options. Thus answer is option C

Explanation:

An operating system should support multiple logins. Because the login plays a major role and that is the need and mainly in the organization where one system will be shared by multiple users. Also, Operating system should perform multi-tasking. This efficiency is required so that the user completes the work very faster and he need not wait to go for the next task.

For example an operating system handles user’s task, background tasks, keep track of the status of the devices, allots output device to the requested user and so on.  

5 0
3 years ago
Read 2 more answers
Core to resource management system is the _________that coordinates the server hardware.
vichka [17]
Hehdhdjdjddjdjid iridium chi jo j o j o j o j
5 0
3 years ago
Other questions:
  • How can u refer to additional information while giving a presentation
    15·1 answer
  • Discuss trends in cellular data transmission speeds
    15·2 answers
  • Complete the sentence.
    14·1 answer
  • . ____________is/are the JSP ImplicitObject(s).sessionapplicationconfigAll of GivenNone of Given
    9·1 answer
  • Connect 5 LEDs with any random colors. Iteratively, turn ON 1 to 5 LED(s) that will take 5 iterations in total, and in every ite
    6·1 answer
  • Is Brainly cheating??
    10·2 answers
  • 6. Find the volume of the figure. Round your answers to the nearest
    11·1 answer
  • What can handle work that is hard on a person and could cause repetitive injuries?
    6·1 answer
  • In order to view a page break what should you do
    8·1 answer
  • Cable inside the computer transferring data between the mother board and storage devices.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!