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
Given a matrix, clockwise-rotate elements in it. Please add code to problem3.cpp and the makefile. Use the code in p3 to test yo
rusak2 [61]

Answer:

/* C Program to rotate matrix by 90 degrees */

#include<stdio.h>

int main()

{

int matrix[100][100];

int m,n,i,j;

printf("Enter row and columns of matrix: ");

scanf("%d%d",&m,&n);

 

/* Enter m*n array elements */

printf("Enter matrix elements: \n");

for(i=0;i<m;i++)

{

 for(j=0;j<n;j++)

 {

  scanf("%d",&matrix[i][j]);

 }

}

 

/* matrix after the 90 degrees rotation */

printf("Matrix after 90 degrees roration \n");

for(i=0;i<n;i++)

{

 for(j=m-1;j>=0;j--)

 {

  printf("%d  ",matrix[j][i]);

 }

 printf("\n");

}

 

return 0;

 

}

5 0
3 years ago
A rocket is launched from rest with a constant upwards acceleration of 18 m/s2. Determine its velocity after 25 seconds
lisabon 2012 [21]

Answer:

The final velocity of the rocket is 450 m/s.

Explanation:

Given;

initial velocity of the rocket, u = 0

constant upward acceleration of the rocket, a = 18 m/s²

time of motion of the rocket, t = 25 s

The final velocity of the rocket is calculated with the following kinematic equation;

v = u + at

where;

v is the final velocity of the rocket after 25 s

Substitute the given values in the equation above;

v = 0 + 18 x 25

v = 450 m/s

Therefore, the final velocity of the rocket is 450 m/s.

5 0
2 years ago
Vehicles begin to arrive at a parking lot at 8:10 am at a constant rate of 6 veh/min until 8:25 am. There is no arrival from 8:2
tresset_1 [31]

1.i am superman

2.175 175 175

3.em dilisues

4.bye classmate magbabalik pa ako

8 0
3 years ago
What. is the capital city of panjab​
kotegsom [21]

Answer:

Chandigarh

Explanation:

Chandigarh city is the capital of the territory and of the states of Haryana and Punjab. Chandigarh's name, meaning “stronghold of the goddess Chandi,” is derived from the Chandi Mandir, a temple dedicated to the goddess that is located near the town of Mani Majra. Area union territory, 44 square miles (114 square km).

8 0
3 years ago
• ¿Qué les reclamó Dios al pueblo?<br> • ¿Qué consecuencias hubo?
HACTEHA [7]

a quien alos israelitas

8 0
3 years ago
Other questions:
  • Determine the minimum force P to prevent the 30 kg uniform rod AB from sliding. The contact surface at B is smooth, whereas the
    13·1 answer
  • When we utilize a visualization on paper/screen, that visualization is limited to exploring: Group of answer choices Relationshi
    9·1 answer
  • the voltage across a 5mH inductor is 5[1-exp(-0.5t)]V. Calculate the current through the inductor and the energy stored in the i
    6·1 answer
  • Which scientist was famous for his laws on gravity?
    10·2 answers
  • 4. An aluminum alloy fin of 12 mm thick, 10 mm width and 50 mm long protrudes from a wall, which is maintained at 120C. The amb
    6·1 answer
  • How can you do this 5.2.4: Rating?
    5·1 answer
  • How much energy in joule is added to a 12 g of sample of aluminum (c=0.897 J/g ◦C) to raise the temperature from 20 ◦C to 45 ◦C?
    14·1 answer
  • On calculating which of the following quantities , does the body have an effect in simple projectile motion?​
    10·1 answer
  • The project's criteria.
    11·1 answer
  • the maximum load that a hori-zontal beam can carry is directly proportional to its width. if a beam 1.5 inches wide can support
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!