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
Refrigerant-134a at 400 psia has a specific volume of 0.1144 ft3/lbm. Determine the temperature of the refrigerant based on (a)
vekshin1

Answer:

a) Using Ideal gas Equation, T = 434.98°R = 435°R

b) Using Van Der Waal's Equation, T = 637.32°R = 637°R

c) T obtained from the refrigerant tables at P = 400 psia and v = 0.1144 ft³/lbm is T = 559.67°R = 560°R

Explanation:

a) Ideal gas Equation

PV = mRT

T = PV/mR

P = pressure = 400 psia

V/m = specific volume = 0.1144 ft³/lbm

R = gas constant = 0.1052 psia.ft³/lbm.°R

T = 400 × 0.1144/0.1052 = 434.98 °R

b) Van Der Waal's Equation

T = (1/R) (P + (a/v²)) (v - b)

a = Van Der Waal's constant = (27R²(T꜀ᵣ)²)/(64P꜀ᵣ)

R = 0.1052 psia.ft³/lbm.°R

T꜀ᵣ = critical temperature for refrigerant-134a (from the refrigerant tables) = 673.6°R

P꜀ᵣ = critical pressure for refrigerant-134a (from the refrigerant tables) = 588.7 psia

a = (27 × 0.1052² × 673.6²)/(64 × 588.7)

a = 3.596 ft⁶.psia/lbm²

b = (RT꜀ᵣ)/8P꜀ᵣ

b = (0.1052 × 673.6)/(8 × 588.7) = 0.01504 ft³/lbm

T = (1/0.1052) (400 + (3.596/0.1144²) (0.1144 - 0.01504) = 637.32°R

c) The temperature for the refrigerant-134a as obtained from the refrigerant tables at P = 400 psia and v = 0.1144 ft³/lbm is

T = 100°F = 559.67°R

7 0
3 years ago
A frying pan is connected to a 150-volt circuit. If the resistance of the frying pan is 25 ohms, how many amperes does the fryin
mario62 [17]

Answer:

Explanation:

Ohms Law I=E/R (resistive requires no power factor correction)

150/25= 6 amps

5 0
3 years ago
Car B is traveling a distance dd ahead of car A. Both cars are traveling at 60 ft/s when the driver of B suddenly applies the br
vagabundo [1.1K]

Answer:

Explanation:

Using the kinematics equation v = v_o + a_ct to determine the velocity of car B.

where;

v_o = initial velocity

a_c = constant deceleration

Assuming the constant deceleration is = -12 ft/s^2

Also, the kinematic equation that relates to the distance with the time is:

S = d + v_ot + \dfrac{1}{2}at^2

Then:

v_B = 60-12t

The distance traveled by car B in the given time (t) is expressed as:

S_B = d + 60 t - \dfrac{1}{2}(12t^2)

For car A, the needed time (t) to come to rest is:

v_A = 60 - 18(t-0.75)

Also, the distance traveled by car A in the given time (t) is expressed as:

S_A = 60  * 0.75 +60(t-0.75) -\dfrac{1}{2}*18*(t-0.750)^2

Relating both velocities:

v_B = v_A

60-12t = 60 - 18(t-0.75)

60-12t =73.5 - 18t

60- 73.5 = - 18t+ 12t

-13.5 =-6t

t = 2.25 s

At t = 2.25s, the required minimum distance can be estimated by equating both distances traveled by both cars

i.e.

S_B = S_A

d + 60 t - \dfrac{1}{2}(12t^2) = 60  * 0.75 +60(t-0.75) -\dfrac{1}{2}*18*(t-0.750)^2

d + 60 (2.25) - \dfrac{1}{2}(12*(2.25)^2) = 60  * 0.75 +60((2.25)-0.75) -\dfrac{1}{2}*18*((2.25)-0.750)^2

d + 104.625 = 114.75

d = 114.75 - 104.625

d = 10.125 ft

3 0
3 years ago
*3–32. The rubber block is subjected to an elongation of 0.03 in. along the x axis, and its vertical faces are given a tilt so t
riadik2000 [5.3K]

Rubber block is not shown. I have attached an image of it.

Answer:

A) ε_x = 0.0075

B) ε_y = 0.00375

C) γ_xy = 0.0122 rad

Explanation:

We are given;

δ = 0.03 in

L = 4 in

ν_r = 0.5

θ = 89.3° = 89.3π/180 rad

Let's calculate ε_x in the direction of axis x

Thus, ε_x = δ/L = 0.03/4 = 0.0075

Let's calculate ε_y in the direction of axis y;

ε_y = v•ε_x = 0.5 x 0.0075 = 0.00375

Now, shear strain is angle between π/2 rad surfaces at that point.

Thus,

γ_xy =  π/2 - θ = π/2 - 89.3π/180

γ_xy = π(0.003889) = 0.0122 rad

3 0
3 years ago
Write a statement to print the data members of InventoryTag. End with newline. Ex: if itemID is 314 and quantityRemaining is 500
Advocard [28]

Answer:

#include <stdio.h>

typedef struct InventoryTag_struct {

int itemID;

int quantityRemaining;

} InventoryTag;

int main(void) {

InventoryTag redSweater;

redSweater.itemID = 314;

redSweater.quantityRemaining = 500;

/* Your solution goes here */

printf("Inventory ID: %d, Qty: %d\n",redSweater.itemID,redSweater.quantityRemaining);

getchar();

return 0;

}

Explanation:

7 0
3 years ago
Other questions:
  • During the collision, is the magnitude of the force of asteroid A on asteroid B greater than, less than, or equal to the magnitu
    11·2 answers
  • The outer surface of a spacecraft in space has an emissivity of 0.6 and an absorptivity of 0.2 for solar radiation. If solar rad
    12·1 answer
  • a vertical cylindrical container is being cooled in ambient air at 25 °C with no air circulation. if the initial temperature of
    12·2 answers
  • How do I cancel my subscription
    12·2 answers
  • Which energy source would you rank as the best option for the rescue team? Why?
    9·1 answer
  • Firefighters are holding a nozzle at the end of a hose while trying to extinguish a fire. The nozzle exit diameter is 8 cm, and
    9·1 answer
  • In order to be a Mechanical Engineer, you need to:
    5·2 answers
  • What is a beam on a bridge? what does it do?
    6·1 answer
  • What building codes did Mega Corporation fail to follow?
    9·1 answer
  • A cyclic tensile load ranging from 0 kN to 55 kN force is applied along the length of a 100 mm long bar with a 15 mm x 15 mm squ
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!