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
Alika [10]
3 years ago
7

You want to know your grade in Computer Science, so write a program that continuously takes grades between 0 and 100 to standard

input until you input "stop", at which point it should print your average to standard output. Instructor Notes: Make sure to initialize counter and total to 0 Read the grades between 0 and 100: grade = input() Use while loop as long as the grades input is not equal to "stop" Make sure to total int(grades) Increment counter by one input the grade again Finally, print the average: total/counter
Engineering
1 answer:
Margarita [4]3 years ago
5 0

Answer:

The code is given below in python

# Code Block 1

count = 0  # count variable

total = 0  # total variable

enter = '' # input variable

while enter != 'stop':

   enter = input('Enter a grade:' )

   if enter != 'stop' and enter.isdigit():

       total += int(enter) # add to total value

       count = count + 1   # then to the count

print float(total) / count

# Code Block 2

numbers = []

while enter != 'stop':

   enter = input('Enter a grade:' )

   if enter != 'stop':

       numbers.append(int(enter))

print sum(numbers) / float(len(numbers))

You might be interested in
What did August Comte contribute to sociology including positivism
Travka [436]

Answer:

Auguste Comte was the first to develop the concept of "sociology." He defined sociology as a positive science. Positivism is the search for "invariant laws of the natural and social world." Comte identified three basic methods for discovering these invariant laws, observation, experimentation, and comparison.

Explanation:

I hope it's help u :)

4 0
3 years ago
What is the focus of 7th grade civics
Jobisdone [24]
C. seems like the best answer. i may be wrong so don’t quote me on that
7 0
3 years ago
Read 2 more answers
Drivers education - Unit 3
melamori03 [73]

The following scenarios are pertinent to driving conditions that one may encounter. See the following rules of driving.

<h3>What do you do when the car is forced into the guardrail?</h3>

Best response:

  • I'll keep my hands on the wheel and slow down gradually.
  • The reason I keep my hands on the steering wheel is to avoid losing control.
  • This will allow me to slowly back away from the guard rail.
  • The next phase is to gradually return to the fast lane.
  • Slamming on the brakes at this moment would result in a collision with the car behind.

Scenario 2: When driving on a wet road and the car begins to slide

Best response:

  • It is not advised to accelerate.
  • Pumping the brakes is not recommended.
  • Even lightly depressing and holding down the brake pedal is not recommended.
  • The best thing to do is take one foot off the gas pedal.
  • There should be no severe twists at this time.

Scenario 3: When you are in slow traffic and you hear the siren of an ambulance behind

Best response:

  • The best thing to do at this moment is to go to the right side of the lane and come to a complete stop.
  • This helps to keep the patient in the ambulance alive.
  • It also provide a clear path for the ambulance.
  • Moving to the left is NOT recommended.
  • This will exacerbate the situation. If there is no place to park on the right shoulder of the road, it is preferable to stay in the lane.

Learn more about rules of driving. at;

brainly.com/question/8384066

#SPJ1

4 0
2 years ago
Which one is suitable for industries petrol engine or diesel engine and why?
klio [65]

Answer:

diesel engine

Explanation:

because diesel is stronger than petrol

3 0
3 years ago
Read 2 more answers
When were dresses made
klio [65]

Answer:

The world's oldest dress called the Tarkhan Dress is at 5,100 to 5,500 years of age.

Does that help? Or do you need something else? I can change my answer if this is not what you need! :D

Explanation:

6 0
3 years ago
Other questions:
  • What is the air change rate (ACH) for a 100 ft^2 (9.3 m^2) space with a 10 ft (3.0 m) ceiling and an airflow rate of 200 cfm (95
    12·1 answer
  • Polymer ropes and lines for use on water are often designed to float, to aid in their retrieval and to avoid applying a downward
    6·1 answer
  • A stainless-steel specimen from the same material characterized up above, was formed into a rectangular cross-section of dimensi
    9·1 answer
  • Adore.aaliyah_ add me loves !
    7·1 answer
  • The following is a list of metals and alloys:
    10·1 answer
  • Thermodynamics deals with the macroscopic properties of materials. Scientists can make quantitative predictions about these macr
    13·1 answer
  • A partnership between a gaming company and moviemakers might happen in what two ways?
    6·1 answer
  • The pressure intensity at a point in a fluid is equal in all directions a.true b.false​
    12·1 answer
  • A beam spans 40 feet and carries a uniformly distributed dead load equal to 2.2 klf (not including beam self-weight) and a live
    15·1 answer
  • The removed soil at an excavation site is also called spoil?​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!