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
Linguist study
alexandr402 [8]
D).

Linguist is the study all about a language spoken written and the modern ways of using it via slang etc.
8 0
3 years ago
DEFINE Problem:
zheka24 [161]

Answer:

lol

Explanation:

goodluck

3 0
2 years ago
Under the Home tab, controls for aligning text and objects can be found in the
lorasvet [3.4K]
I believe the answer is editing group
7 0
3 years ago
Read 2 more answers
A local variable that is declared as ____ causes the program to keep the variable and its latest value even when the function th
Nata [24]

Answer:

Static.

Explanation:

A local variable can be defined as an argument passed to a function or a variable that is declared within a function and as such can only be used or accessed within the function.

This ultimately implies that, a local variable is effective whilst the function or block is being executed (active).

Basically, all local variables can only be a member of either the register storage, static or auto (dynamic) categories in computer programming.

A local variable that is declared as static causes the program to keep the variable and its latest value even when the function that declared it is through executing.

Hence, the memory of a local variable that is declared as static remains for the lifetime (duration) of the whole program.

7 0
2 years ago
joe is in the planning stages to make sure that an upcoming company promotion during a major sporting event will not overwhelm h
VikaD [51]

The possible solutions to recommend are that Vertical scaling, Horizontal scaling, Cloud bursting

The cloud computing business model is based on a utilitarian business model, which charges you solely for the resources you use. With this strategy, you may scale your cloud fleet to suit its present workload and add and subtract capacity as needed. Variability may be used to scale cloud services in a variety of ways, including vertical and horizontal scaling and bursting. Horizontal scaling in cloud computing refers to adding more instances rather than switching to a bigger instance size. Vertical scaling involves the addition of more or faster CPUs, memory, or I/O resources to an existing server or the replacement of one server by a more physical server.

Learn more about the utility business model here: brainly.com/question/28668154brainly.com/question/29349562

#SPJ4

3 0
1 year ago
Other questions:
  • If you are a driver under 21 with a breath or blood alcohol level of ____ or higher, you will be required to attend a substance
    11·2 answers
  • Which audio editing effect uses the option ""Get Profile"" to execute its function?
    6·1 answer
  • Objects falling through air experience a type of friction called.. A.terminal velocity B.air resistance C.rolling friction
    8·1 answer
  • When should students practice netiquette in an online course?
    9·1 answer
  • What is a seismogram?
    9·1 answer
  • Identifies the row and column that forms the cell
    11·1 answer
  • True or False: When you share something on a friend’s Timeline, only that friend can see it.
    5·2 answers
  • How can you remove background noise from a video?
    15·2 answers
  • What do you do when ur grounded from all electronics and can't go outside and have t clean all day
    10·1 answer
  • 12. Why is it so important to pay attention to your digital reputation?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!