Help me to solve it in pyton | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Help me to solve it in pyton

I think that with a probability of 50%, this code should print "winner = 1", and with a chance of 50%, it should print "winner = 2"; however, it always writes "winner = 1". Can you please explain the reason to me? I really appreciate any help you can provide. https://code.sololearn.com/cFM90re2Sw30/?ref=app

2nd Jul 2022, 5:00 PM
Shima Mohkami
Shima Mohkami - avatar
4 Answers
+ 2
It's such a mess. Please format your code with correct indentation. And also, explain what the stvpoll module is
2nd Jul 2022, 5:11 PM
Slick
Slick - avatar
2nd Jul 2022, 6:05 PM
Shima Mohkami
Shima Mohkami - avatar
0
https://en.m.wikipedia.org/wiki/Single_transferable_vote
2nd Jul 2022, 6:10 PM
Shima Mohkami
Shima Mohkami - avatar
0
Please help
3rd Jul 2022, 4:13 AM
Shima Mohkami
Shima Mohkami - avatar