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
nydimaria [60]
4 years ago
9

Create a program that asks the user to enter grade scores. Use a loop to request each score and add it to a total. Continue acce

pting scores until the user enters a negative value. Finally, calculate and display the average for the entered scores.
Computers and Technology
1 answer:
fomenos4 years ago
6 0

Answer:

total = 0

count = 0

while(True):

   grade = float(input("Enter a grade: "))

   if grade < 0:

       break

   else:

       total += grade

       count += 1

       

average = total/count

print("The average is: " + str(average))

Explanation:

*The code is in Python.

Initialize the total and count as 0

Create a while loop that iterates until a specific condition is met inside the loop

Inside the loop, ask the user to enter a grade. If the grade is smaller than 0, stop the loop. Otherwise, add the grade to the total and increment the count by 1.

When the loop is done, calculate the average, divide the total by count, and print it

You might be interested in
A tower or mini tower pc is a type of all- in -one unit true or false
Svetlanka [38]

Answer:

thx

Explanation:

5 0
3 years ago
Read 2 more answers
Spam and i report
defon

Answer:

option d is the correct answer

8 0
3 years ago
Read 2 more answers
Who does Potholes effect in South Africa?
Morgarella [4.7K]
By definition, a pothole is a structure mostly located at the surface of roads and highways wherein it is usually characterised by having deep crevices which are primarily caused by extreme soil erosion or the presence of water in the area. In addition, these potholes greatly affect the transportation system of South Africa because the flow of traffic will be interrupted.
4 0
3 years ago
What guidelines should you follow when adding graphics to your presentations?
Elena L [17]
B, C, and D are the correct answers.
3 0
4 years ago
Read 2 more answers
Describe how you believe technology will impact our society in 50 years.
N76 [4]

Answer:

Wall-e

Explanation:

We will all be fat, lazy, on floating chairs with everything in our lives being automated thanks to AI and everyone's obsession to do less.

5 0
3 years ago
Other questions:
  • OSHA requires that employers pay for most required personal protective equipment (PPE), including: A. Hard hats B. Logging boots
    5·1 answer
  • An expression that has correctly paired delimiters is called a(n)
    6·1 answer
  • Check My Work _____ are made in response to situations that have occurred frequently enough to enable managers to develop decisi
    15·1 answer
  • It proceeds the statement causes execution of the current loop iteration to end and commence at the beginning of the next loop.
    10·1 answer
  • Which method can help you prevent RSI while using a keyboard?
    14·1 answer
  • _____ is the software that protects you computer from harmful files, Trojan horses, and worms.
    13·2 answers
  • What is the FaFASA4caster used for
    10·1 answer
  • Use the variables k and total to write a while loop that computes the sum of the squares of the first 50 counting numbers, and a
    6·1 answer
  • Write the simplest statement that prints the following: 3 2 1 Go! python
    6·1 answer
  • In additon to setting up services, what other tasks does a sysadmin have to keep in mind? check all that apply.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!