Question: Write a program to ask users repeatedly who they voted for. The choices allowed are Kamala, Trump. The program stops when they enter - 1

Write a program to ask users repeatedly who they voted for. The choices allowed are Kamala, Trump. The program stops when they enter -1000. Count the total number of votes for each candidate and display result. Sample output Enter your vote: Trump Enter your vote: Kamala Enter your vote: Trump There are 2 votes for Trump There are 1 votes for Kamala Use Partial code given Do not change code trump_votes =0 kamala_votes =0 vote = input ("Enter vote") while (#write this) #complete thid if vote == "Trump": trump_votes +=1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!