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
An air conditioner removes heat steadily from a house at a rate of 750 kJ/min while drawing electric power at a rate of 6 kW. De
Paraphin [41]

Answer:

a. 2.08, b. 1110 kJ/min

Explanation:

The power consumption and the cooling rate of an air conditioner are given. The COP or Coefficient of Performance and the rate of heat rejection are to be determined. <u>Assume that the air conditioner operates steadily.</u>

a. The coefficient of performance of the air conditioner (refrigerator) is determined from its definition, which is

COP(r) = Q(L)/W(net in), where Q(L) is the rate of heat removed and W(net in) is the work done to remove said heat

COP(r) = (750 kJ/min/6 kW) x (1 kW/60kJ/min) = 2.08

The COP of this air conditioner is 2.08.

b. The rate of heat discharged to the outside air is determined from the energy balance.

Q(H) = Q(L) + W(net in)

Q(H) = 750 kJ/min + 6 x 60 kJ/min = 1110 kJ/min

The rate of heat transfer to the outside air is 1110 kJ for every minute.

5 0
4 years ago
In which of the following states would homes most likely have the deepest foundation?
Evgen [1.6K]

Answer:

D) Louisiana, to prevent homes from blowing away in hurricanes.

Explanation:

Louisiana is famous for hurricanes i think that if they were well prepared and had deeper foundation the damage may lower by a good lot.

5 0
3 years ago
Technician A says the final drive assembly always has a gear ratio of 1:1. Technician B says the final drive assembly provides f
Olenka [21]

Answer:

Technician B only is correct

Explanation:

The last stage of gears found between the vehicle transmission system and the wheels is the final drive ratio. The function of the final drive gear assembly is to enable a gear reduction control stage to reduce the rotation per minute and increase the wheel torque, such that the vehicle performance can be adjusted and the final gear ratio can be between 3:1 and 4.5:1 not 1:1

Therefore, technician B only is correct

5 0
4 years ago
What is a voltage divider circuit and how do you calculate the voltage across one element in a series
Rama09 [41]
Sorry I don’t know myself
6 0
2 years ago
The B-pillar may also be called the:
slega [8]

Answer:

if you're talking about the car b-post, the answer is "posts"

Explanation:

looked it up

6 0
3 years ago
Other questions:
  • What is the solution to the system of equations?<br><br>2x-y=7<br>y=2x+3​
    8·1 answer
  • Hey, I have a question, I was thinking that if you have engineering skills or drawing skill you could help me to start a project
    15·1 answer
  • What is a two stroke engine and what is a four stroke engine, please keep the definitions as simple as can be and please explain
    8·2 answers
  • Air enters a compressor operating at steady state at 176.4 lbf/in.^2, 260°F with a volumetric flow rate of 424 ft^3/min and exit
    10·1 answer
  • When checking the resistance of a dual voltage wye motor, there should be ____ resistance readings. 1) twelve 2) six 3) three
    12·1 answer
  • On July 23, 1983, Air Canada Flight 143 required 22,300 kg of jet fuel to fly from Montreal to Edmonton. The density of jet fuel
    8·1 answer
  • Define volume flow rate of air flowing in a duct of area A with average velocity V.
    13·1 answer
  • You are designing a geartrain with three spur gears: one input gear, one idler gear,and one output gear. The diametral pitch for
    13·1 answer
  • What are the advantages to a quality<br> saw?
    6·1 answer
  • A steel bar with a diameter of .875 inches and a length of 15.0 ft is axially loaded with a force of 21.6 kip. The modulus of el
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!