answer.
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]
2 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]2 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
A pair of spur gears with 20 degree pressure angle, full-depth, involute teeth transmits 65 hp. The pinion is mounted on a shaft
vfiekz [6]

Answer:

See explaination

Explanation:

a) The pitch circle diameter of pinion in inches is given by

Dp=Np/P

Where

Np= No. of teeth in pinion = 26

P =diametral pitch= 6

Hence

Dp= 26/6 = 4.333 in

Pinion angular speed\omega _{p} =1250 rpm = 130.9 rad/s

Therefore pitch line speed

V=Dp/2\omega _{p} = 4.333/2x130.9

= 283.62 in/s

V= 23.63 ft/s

V=1418 ft/min

b) The pitch circle diameter og gear is given by

Dg= Ng/P= 48/6 = 8 in

The center distance is given by

C=(Dp+Dg)/2

= (4.333+8)/2

C= 6.167 in

c) The torque on the pinion is given by

Tp= P/\omega _{p}

Where

P = transmitted power, =65 hp = 65x550= 35750 lt-lb/s

Tp= 35750/130.9

= 273.1 ft-lb

d) Speed ratio is given as

R=Ng/Np= 48/26 = 1.8461

Hence speed of gear is

\omega _{g}=\frac{\omega _{p}}{R}

= 130.9/1.8461

= 70.9 rad/s

Therefore torque on gear is given as

Tg= P/\omega _{g} = 35750/70.9

= 504.2 ft-lb

e) Assuming transmission eficiency of 100%

Output hp=input hp= 65 hp

f) Tangential force on gear teeth is given by

Fgt= Tg/(Dg/2)

= 504.2x2/8

= 126.05 lb

g) Radial force on ger teeth is given as

Fgr= Fgt tan\phi

Where

\phi is pressure angle = 200

Hence

Fgr= 126.05tan200

= 45.88 lb

h) The normal force on gear teeth is given as

F=Fgt/cos\phi

= 126.05/cos200

= 134.14 lb

4 0
2 years ago
CHALLENGE ACTIVITY 2.8.1: Using constants in expressions. The cost to ship a package is a flat fee of 75 cents plus 25 cents per
mihalych1998 [28]

Answer:

Weight(lb): 10

Flat fee(cents): 75

Cents per pound: 25

Shipping cost(cents): 325

Explanation:

we run this as a jave programming language

import java.util.Scanner;

public class Shipping Calculator {

   public static void main (String [] args) {

       int shipWeightPounds = 10;

       int shipCostCents = 0;

       final int FLAT_FEE_CENTS = 75;

       

        final int CENTS_PER_POUND = 25;

       shipCostCents = FLAT_FEE_CENTS + CENTS_PER_POUND * shipWeightPound

       /* look up the solutioin above */

       System.out.println("Weight(lb): " + shipWeightPounds);

       System.out.println("Flat fee(cents): " + FLAT_FEE_CENTS);

       System.out.println("Cents per pound: " + CENTS_PER_POUND);

       System.out.println("Shipping cost(cents): " + shipCostCents);

   }

}

7 0
2 years ago
A thin metal disk of mass m=2.00 x 10^-3 kg and radius R=2.20cm is attached at its center to a long fiber. When the disk is turn
topjm [15]

Answer:

k = 1.91 × 10^-5 N m rad^-1

Workings and Solution to this question can be viewed in the screenshot below:

6 0
2 years ago
An optical mouse originally cost $31.85. Before it was removed from the store, it underwent the following changes in price. 27%
saul85 [17]

Answer:

b.

$43.21

Explanation:

8 0
2 years ago
Read 2 more answers
Toeboards are usually ___ inches high and used on landings and balconies.
Ksju [112]

Answer:4 inches

Explanation:

Google told me

6 0
2 years ago
Other questions:
  • Pam Jones worked for 41 years at the same company and had positive performance ratings and personnel records. She needed a calcu
    9·1 answer
  • When a man returns to his well-sealed house on a summer day, he finds that the house is at 35°C. He turns on the air conditioner
    13·1 answer
  • Flow and Pressure Drop of Gases in Packed Bed. Air at 394.3 K flows through a packed bed of cylinders having a diameter of 0.012
    8·1 answer
  • Steam at 40 bar and 500o C enters the first-stage turbine with a volumetric flow rate of 90 m3 /min. Steam exits the turbine at
    9·1 answer
  • A commercial refrigerator with refrigerant-134a as the working fluid is used to keep the refrigerated space at -30C by rejecting
    13·1 answer
  • The mechanical properties of some metals may be improved by incorporating fine particles of their oxides. If the moduli of elast
    12·1 answer
  • Milton has been tracking the migrating patterns of whales in the northwest Atlantic Ocean for five years. He knows where and whe
    5·2 answers
  • technician A says that in any circuit, electrical current takes the path of least resistance. technician B says that while this
    13·1 answer
  • The BARO sensor informs the PCM about changes in weather and ____________________.
    14·1 answer
  • Alicia had to get over her fear of heights in order to become comfortable maintaining the generators in wind turbines. professio
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!