Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In need of help completing the process of the Plurality with Elimination method. I have to create code using Python 2 to complete the stated
In need of help completing the process of the Plurality with Elimination method. I have to create code using Python 2 to complete the stated steps above. The data that needs to be used is displayed above as well. Anything helps, thank you!
Out[5] Number of Votere 14 10 8 4 1 1st A CDB 2nd B B C D D 3rd C D B C B 4th D A A A A The Process of Plurality-with-Elimination Method 0. Step 0, compute majority criterion, half of the total number of voters. 1. Step 1, compute the lowest score for current round. 2. Step 2, eliminate the lowest score for current round. A. Cross out the name of the canditate who has the lowest score. B. Remove the canditate out from the table. C. Compute number of votes of highest ranked candidate. Decide if next round is needed. 3. Repeat step 1 and 2 until ending conditions are met, print out the winner at the end. Your code must be able to handle data wit 1. Different number of candidates 2. Different candidate name 3. Different number of voting groups Test your code on all four of the sample datasets provided. Out[5] Number of Votere 14 10 8 4 1 1st A CDB 2nd B B C D D 3rd C D B C B 4th D A A A A The Process of Plurality-with-Elimination Method 0. Step 0, compute majority criterion, half of the total number of voters. 1. Step 1, compute the lowest score for current round. 2. Step 2, eliminate the lowest score for current round. A. Cross out the name of the canditate who has the lowest score. B. Remove the canditate out from the table. C. Compute number of votes of highest ranked candidate. Decide if next round is needed. 3. Repeat step 1 and 2 until ending conditions are met, print out the winner at the end. Your code must be able to handle data wit 1. Different number of candidates 2. Different candidate name 3. Different number of voting groups Test your code on all four of the sample datasets providedStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started