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]
3 years ago
15

Write a python program to apply this:

Engineering
1 answer:
lakkis [162]3 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
A system consists of a disk rotating on a frictionless axle
kakasveta [241]

The system includes a disk rotating on a frictionless axle and a bit of clay transferring towards it, as proven withinside the determine above.

<h3>What is the angular momentum?</h3>

The angular momentum of the device earlier than and after the clay sticks can be the same.

Conservation of angular momentum the precept of conservation of angular momentum states that the whole angular momentum is usually conserved.

  1. Li = Lf where;
  2. li is the preliminary second of inertia
  3. If is the very last second of inertia
  4. wi is the preliminary angular velocity
  5. wf is the very last angular velocity
  6. Li is the preliminary angular momentum
  7. Lf is the very last angular momentum

Thus, the angular momentum of the device earlier than and after the clay sticks can be the same.

Read more about the frictionless :

brainly.com/question/13539944

#SPJ4

8 0
2 years ago
Number pattern Write a recursive method called print Pattern() to output the following number pattern. Given a positive integer
lilavasa [31]

Answer:

See explaination

Explanation:

Code;

import java.util.Scanner;

public class NumberPattern {

public static int x, count;

public static void printNumPattern(int num1, int num2) {

if (num1 > 0 && x == 0) {

System.out.print(num1 + " ");

count++;

printNumPattern(num1 - num2, num2);

} else {

x = 1;

if (count >= 0) {

System.out.print(num1 + " ");

count--;

if (count < 0) {

System.exit(0);

}

printNumPattern(num1 + num2, num2);

}

}

}

public static void main(String[] args) {

Scanner scnr = new Scanner(System.in);

int num1;

int num2;

num1 = scnr.nextInt();

num2 = scnr.nextInt();

printNumPattern(num1, num2);

}

}

See attachment for sample output

3 0
3 years ago
Read 2 more answers
Identify three operational controls and explain<br> how to use them?
ladessa [460]

Answer:

5.1 Personnel Security. ...

5.2 Physical and Environmental Protection. ...

5.3 Production, Input and Output Controls. ...

5.4 Contingency Planning and Disaster Recovery. ...

5.5 System Configuration Management Controls. ...

5.6 Data Integrity / Validation Controls. ...

5.7 Documentation. ...

5.8 Security Awareness and Training.

8 0
2 years ago
What is the measurement of mass in motion is known as
podryga [215]

Answer:

momentum

Explanation:

Mass - Mass is a measurement of how much matter is in an object. It is usually measured in kilograms. Momentum is equal to the mass times the velocity of an object. Momentum is a measurement of mass in motion

8 0
3 years ago
thermal energy is being added to steam at 475.8 kPa and 75% quality. determine the amount of thermal energy to be added to creat
eduard

Answer:

q_{in} = 528.6\,\frac{kJ}{kg}

Explanation:

Let assume that heating process occurs at constant pressure, the phenomenon is modelled by the use of the First Law of Thermodynamics:

q_{in} = h_{g} - h_{mix}

The specific enthalpies are:

Liquid-Vapor Mixture:

h_{mix} = 2217.2\,\frac{kJ}{kg}

Saturated Vapor:

h_{g} = 2745.8\,\frac{kJ}{kg}

The thermal energy per unit mass required to heat the steam is:

q_{in} = 2745.8\,\frac{kJ}{kg} - 2217.2\,\frac{kJ}{kg}

q_{in} = 528.6\,\frac{kJ}{kg}

7 0
3 years ago
Other questions:
  • Which situation might cause potential hazards at a construction site?
    12·2 answers
  • I need solution for this question please ​
    7·2 answers
  • What are the characteristic features of stress corrosion cracks?
    15·1 answer
  • A motorist enters a freeway at 25 mi/h and accelerates uniformly to 65 mi/h. From the odometer in the car, the motorist knows th
    14·1 answer
  • Q.17) A 50-acre catchment containing cropland is converted ot a Qatar mail
    13·1 answer
  • For methyl chloride at 100°C the second and third virial coefficients are: B = −242.5 cm 3 ·mol −1 C = 25,200 cm 6 ·mol −2 Calcu
    7·1 answer
  • : A cyclical load of 1500 lb is to be exerted at the end of a 10 in. long aluminium beam (see Figure below). The bar must surviv
    6·1 answer
  • La Patrulla Fronteriza de los Estados Unidos analiza la compra de un helicóptero nuevo para la vigilancia aérea de la frontera d
    14·1 answer
  • Multiple Choice
    11·1 answer
  • I'm so confused to this question <br>What is the difference between Science and Engineering? ​
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!