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
galben [10]
4 years ago
15

Write a python program to apply this:

Engineering
1 answer:
lakkis [162]4 years ago
8 0

Answer:

# Initialize a dictionary with the keys

contestants = {"Darci Lynne":0, "Angelica Hale":0, "Angelina Green":0};

# Repeatedly prompt the user for a contestant name to vote for

while True:

 

  # Prompting user for contestant name

  cName = input("Enter contestant name to vote: ");

 

  # Checking for Done

  if cName.lower() == "done":

      break;

 

  # Checking in dictionary

  if cName in contestants.keys():

      # Updating vote value

      contestants[cName] += 1

  # New entry

  else:

      contestants[cName] = 1

 

# Printing header

print("\n%-20s %-15s\n" %("Contestant Name", "Votes Casted"))

# Printing results

for contestant in contestants:

  print("%-23s %-15d" %(contestant, contestants[contestant]))

You might be interested in
Ammonia gas is diffusing at a constant rate through a layer of stagnant air 1 mm thick. Conditions are such that the gas contain
fiasKO [112]

Answer:

The solution to this question is 5.153×10⁻⁴(kmol)/(m²·s)

That is the rate of diffusion of ammonia through the layer is

5.153×10⁻⁴(kmol)/(m²·s)

Explanation:

The diffusion through a stagnant layer is given by

N_{A}  = \frac{D_{AB} }{RT} \frac{P_{T} }{z_{2} - z_{1}  } ln(\frac{P_{T} -P_{A2}  }{P_{T} -P_{A1} })

Where

D_{AB} = Diffusion coefficient or diffusivity

z = Thickness in layer of transfer

R = universal gas constant

P_{A1} = Pressure at first boundary

P_{A2} = Pressure at the destination boundary

T = System temperature

P_{T} = System pressure

Where P_{T} = 101.3 kPa P_{A2} =0, P_{A1} =y_{A}, P_{T} = 0.5×101.3 = 50.65 kPa

Δz = z₂ - z₁ = 1 mm = 1 × 10⁻³ m

R =  \frac{kJ}{(kmol)(K)} ,    T = 298 K   and  D_{AB} = 1.18 \frac{cm^{2} }{s} = 1.8×10⁻⁵\frac{m^{2} }{s}

N_{A} = \frac{1.8*10^{-5} }{8.314*295} *\frac{101.3}{1*10^{-3} }* ln(\frac{101.3-0}{101.3-50.65}) = 5.153×10⁻⁴\frac{kmol}{m^{2}s }

Hence the rate of diffusion of ammonia through the layer is

5.153×10⁻⁴(kmol)/(m²·s)

5 0
3 years ago
Calculate total hole mobility if the hole mobility due to lattice scattering is 50 cm2 /Vsec and the hole mobility due to ionize
Ad libitum [116K]

Answer:

The total hole mobility is 41.67 cm²/V s

Explanation:

Data given by the exercise:

hole mobility due to lattice scattering = ul = 50 cm²/V s

hole mobility due to ionized impurity = ui = 250 cm²/V s

The total mobility is equal:

\frac{1}{u} =\frac{1}{ul} +\frac{1}{ui} \\\frac{1}{u}=\frac{1}{50} +\frac{1}{250} \\u=41.67cm^{2} /Vs

5 0
3 years ago
Read 2 more answers
When we utilize a visualization on paper/screen, that visualization is limited to exploring: Group of answer choices Relationshi
Mila [183]

Answer:

As many variables as we can coherently communicate in 2 dimensions

Explanation:

Visualization is a descriptive analytical technique that enables people to see trends and dependencies of data with the aid of graphical information tools. Some of the examples of visualization techniques are pie charts, graphs, bar charts, maps, scatter plots, correlation matrices etc.

When we utilize a visualization on paper/screen, that visualization is limited to exploring as many variables as we can coherently communicate in 2-dimensions (2D).

6 0
3 years ago
A lake is fed by a polluted stream and a sewage outfall. The stream and sewage wastes have a decay rate coefficient (k) of 0.5/d
joja [24]

Solution :

Given :

k = 0.5 per day

$C_s = 10 \ mg/L \ ; \ \ Q_s= 40 \ m^3/s$

$C_{sw} = 100 \ ppm \ ; \ \ Q_{sw}= 0.5 \ m^3/s$

Volume, V $= 200 \ m^3$

Now, input rate = output rate + KCV ------------- (1)

Input rate  $= Q_s C_s + Q_{sw}C_{sw}$

                $=(40 \times 10) + (0.5\times 100)$

                $= 2 \times 10^5 \ mg/s$

The output rate $= Q_m C_{m}$

                          = ( 40 + 0.5 ) x C x 1000

                          $=40.5 \times 10^3 \ C \ mg/s$

Decay rate = KCV

∴$KCV =\frac{0.5/d \times C \  \times 200 \times 1000}{24 \times 3600}$

            = 1.16 C mg/s

Substituting all values in (1)

$2 \times 10^5 = 40.5 \times 10^3 \ C+ 1.16 C$

C = 4.93 mg/L

4 0
3 years ago
If a machine guard is missing or needs repair, you should ______________.
Gelneren [198K]
B)
Step by step explanation
7 0
3 years ago
Read 2 more answers
Other questions:
  • Flue gases from an incinerator are released to atmosphere using a stack that is 0.6 m in diameter and 10.0 m high. The outer sur
    12·1 answer
  • Write a SELECT statement that returns the same result set as this SELECT statement. Substitute a subquery in a WHERE clause for
    10·1 answer
  • At audio frequencies (below 20kHz), electromagnetic waves have very ____ wavelengths. The wavelength is typically much larger th
    12·1 answer
  • An ordinary egg can be approximated as a 5.5-cm-diameter sphere. The egg is initially at a uniform temperature of 8°C and is dro
    6·1 answer
  • A has a mass of 7 kg, object B has a mass of 5 lbm, and object C has a mass of 0.5 slug. (a) Which object has the largest mass?
    11·1 answer
  • A group of students at University of Central Florida have decided to stop commuting hicle. Instead, each walking and bicycling t
    11·1 answer
  • A transmission line has a velocity factor of 0.88. You desire to create a quarter-wavelength phasing section at an operating fre
    7·1 answer
  • Which one of the following skills is a software engineer specializing in system support expected to possess?
    14·2 answers
  • A simple Brayton cycle using air as the working fluid has a pressure ratio of 10.9. The minimum and maximum temperatures in the
    12·1 answer
  • PLS HELP!!!
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!