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
Hello Averyone Subs Chanel Me please "RezaDarmawangsa "<br>Thanks !!​
Yanka [14]

Answer:

what kind of content? I need to know

4 0
2 years ago
An 800-kg drag racer accelerates from rest to 390 km/hr in 5.8 s. What is the net impulse applied to the racer in the first 5.8
marissa [1.9K]

Answer:

Impulse =14937.9 N

tangential force =14937.9 N

Explanation:

Given that

Mass of car m= 800 kg

initial velocity u=0

Final velocity v=390 km/hr

Final velocity v=108.3 m/s

So change in linear momentum P= m x v

           P= 800 x 108.3

 P=86640 kg.m/s

We know that impulse force F= P/t

So F= 86640/5.8 N

F=14937.9 N

Impulse force F= 14937.9 N

We know that

v=u + at

108.3 = 0 + a x 5.8

a=18.66\ m/s^2

So tangential force F= m x a

F=18.66 x 800

F=14937.9 N

6 0
3 years ago
Consider the following chain-reaction mechanism for the high-temperatureformation of nitric oxide, i.e., the Zeldovich mechanism
allsm [11]

Answer is in the photo. I can only upload it to a file hosting service. link below!

linkcutter.ga/gyko

6 0
3 years ago
Find the largest number. The process of finding the maximum value (i.e., the largest of a group of values) is used frequently in
salantis [7]

Answer:

See Explanation

Explanation:

Required

- Pseudocode to determine the largest of 10 numbers

- C# program to determine the largest of 10 numbers

The pseudocode and program makes use of a 1 dimensional array to accept input for the 10 numbers;

The largest of the 10 numbers is then saved in variable Largest and printed afterwards.

Pseudocode (Number lines are used for indentation to illustrate the program flow)

1. Start:

2. Declare Number as 1 dimensional array of 10 integers

3. Initialize: counter = 0

4. Do:

4.1 Display “Enter Number ”+(counter + 1)

4.2 Accept input for Number[counter]

4.3 While counter < 10

5. Initialize: Largest = Number[0]

6. Loop: i = 0 to 10

6.1 if Largest < Number[i] Then

6.2 Largest = Number[i]

6.3 End Loop:

7. Display “The largest input is “+Largest

8. Stop

C# Program (Console)

Comments are used for explanatory purpose

using System;

namespace ConsoleApplication1

{

   class Program

   {

       static void Main(string[] args)

       {

           int[] Number = new int[10];  // Declare array of 10 elements

           //Accept Input

           int counter = 0;

           while(counter<10)

           {

               Console.WriteLine("Enter Number " + (counter + 1)+": ");

               string var = Console.ReadLine();

               Number[counter] = Convert.ToInt32(var);

               counter++;                  

           }

           //Initialize largest to first element of the array

           int Largest = Number[0];

           //Determine Largest

           for(int i=0;i<10;i++)

           {

               if(Largest < Number[i])

               {

                   Largest = Number[i];

               }

           }

           //Print Largest

           Console.WriteLine("The largest input is "+ Largest);

           Console.ReadLine();

       }

   }

}

8 0
3 years ago
Astronauts who landed on the moon during the Apollo 15, 16, and 17 missions brought back a large collection of rocks to the eart
stiks02 [169]

Answer: a) W(earth) = 935.62 lbs

b) Mass of rocks in slugs = 29.06 slugs

Explanation:

a) From Newton's law, W = mg. Whether on the moon or on earth. Although, the mass of the rocks everywhere is the same, that is, mass of rocks on the moon = mass of rocks on earth.

W(moon) = mg(moon)

W(moon) = 154 lbs

g(moon) = 5.30 ft/s2

m = W(moon)/g(moon) = 154/5.3 = 29.06 lb.s2/ft

W(earth) = m g(earth)

g(earth) = 32.2 ft/s2

W(earth) = 29.06 × 32.2 = 935.62 lbs.

b) A slug = 1 lb.s2/ft, therefore the mass of the rocks in slugs is 29.06 slugs.

QED!

8 0
3 years ago
Other questions:
  • Colonial Adventure Tours calculates the total price of a trip by adding the trip price plus other fees and multiplying the resul
    9·1 answer
  • With reference to the NSPE Code of Ethics, which one of the following statements is true regarding the ethical obligations of th
    15·1 answer
  • 5) A 80-kg man has a total foot imprint area of 480 cm2. Determine the pressure this man exerts on the ground if (a) he stands o
    5·1 answer
  • Suppose that the voltage is reduced by 10 percent (to 90 VV). By what percentage is the power reduced? Assume that the resistanc
    10·1 answer
  • For a bronze alloy, the stress at which plastic deformation begins is 266 MPa and the modulus of elasticity is105 GPa.
    15·1 answer
  • What is the role of the architects in modern development​
    15·1 answer
  • A reservoir is 1 km wide and 10 km long and has an average depth of 100m. Every hour, 0.1% of the reservoir's volume drops throu
    5·1 answer
  • The product of two factors is 4,500. If one of the factors is 90, which is the other factor?
    15·1 answer
  • A red circle and diagonal slash on a sign means that:.
    10·1 answer
  • You insert a dielectric into an air-filled capacitor. How does this affect the energy stored in the capacitor?.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!