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 electric iron has a resistance of 12Ω and takes a current of 2A. Therefore the supply voltage will be
Annette [7]

Answer:

24 volts

Explanation:

V=IR

V=2*12

V=24 volts

3 0
3 years ago
Substance Specific Heat (cal/g°C) Specific Heat (J/g°C) water 1.00 4.18 steam 0.96 4.02 alcohol 0.59 2.47 ice 0.50 2.09 wood 0.4
Jobisdone [24]

Answer:

C) 43,2°C

Explanation:

<em>Sensible heat</em> is the amount of thermal energy that is required to change the temperature of an object, the equation for calculating the heat change is  given by:

Q=msΔT

where:

  • Q, heat that has been absorbed or realeased by the substance [J]
  • m, mass of the substance [g]
  • s, specific heat capacity [J/g°C]
  • ΔT, changes in the substance temperature [°C]

To solve the problem, we clear ΔT of the equation and then replace our data:

Q=890 [J],

m=16,6 [g],

s=2,74 [J/g°C]

Q=msΔT.......................ΔT=Q/ms

ΔT=\frac{890 J}{16,6g*2,47\frac{J}{gC}}=21,7°C

As:

ΔT=Tfinal-Tinitial

Tfinal=ΔT+Tinitial

Tfinal=21,7+21,5=43,2°C

The final temperature of the ethanol is 43,2°C.

4 0
4 years ago
Vapor lock occurs when the gasoline is cooled and forms a gel, preventing fuel flow and
Sergeu [11.5K]

Answer:

True

Explanation:

4 0
3 years ago
Read 2 more answers
A student lab group is brainstorming the design of an experiment that uses an ammeter (measures current) and different resistors
givi [52]

Answer:

  Put a 10.0-ohm resistor in the circuit. Measure the current in the circuit. Replace the 10.0-ohm resistor with a 20.0-ohm resistor. Measure the new current. Continue replacing the resistor with a different resistor of known resistance. Measure the current for each resistor. Record all data.

Explanation:

The only design that has resistance varying with everything else remaining the same is the first design. That would be what you'd want to do if you're exploring the effect of resistance on current.

3 0
3 years ago
8. What is the density of an object with a mass of 290.5 g and volume of 83 cm 3?​
Leni [432]
Answer:

The density would be 218.5
6 0
3 years ago
Other questions:
  • 4. A person is standing 4 miles east from his house. He travels 2 miles east. a. Calculate the initial displacement. b. Calculat
    13·1 answer
  • One kilogram of water fills a 150-L rigid container at an initial pressure of 2 MPa. The container is then cooled to 40∘C. Deter
    7·1 answer
  • Which of the following has led to a safer and more prosperous global community within the last century? the Bronze Age composite
    13·2 answers
  • Light created high energy holes pass through the external circuits. (a)-True(T) (b)- false(F)
    13·1 answer
  • The annual average of solar photovoltaic energy in Phoenix is 6,720
    8·1 answer
  • Hãy trình bày sự hiểu biết của bạn về đo dòng điện
    9·1 answer
  • Cual es el impacto medioambiental del mortero?
    11·1 answer
  • One end of a___ is tapered to a dull point and is used to align larger holes such as
    10·1 answer
  • An engineer is tasked to design a combinational circuit with three inputs x, y, z and one output F to satisfy the following cond
    12·1 answer
  • A plate of width 84mm and thickness 10mm is to be welded to another plate by means of double parallel fillets. The plates are su
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!