Closed chriscarrollsmith closed 2 months ago
As the specification explains:
The function should print out the name of the candidate who is the source of the graph. You may assume there will not be more than one source.
As such, printing multiple winners should cause the check to fail, whether they are separated by spaces or newlines.
Oh, my mistake. I meant plurality, not Tideman. Sorry!
Oh, okay. :) But you may have missed this instruction in the Plurality specification, which tells you that you must print each on a separate line. This is also demonstrated in the Demo.
The election could end in a tie if multiple candidates each have the maximum number of votes. In that case, you should output the names of each of the winning candidates, each on a separate line.
Oh, okay. :) But you may have missed this instruction in the Plurality specification, which tells you that you must print each on a separate line. This is also demonstrated in the Demo.
The election could end in a tie if multiple candidates each have the maximum number of votes. In that case, you should output the names of each of the winning candidates, each on a separate line.
Thanks; I did miss that.
I noticed that in the instructions for the plurality problem, nothing specifies whether to print multiple winners separated by newlines rather than spaces. However,
check50
returns a failure if you print them with spaces. Probably either the instructions should be clarified, or thecheck50
test expectation should be relaxed a bit.Edited to correct name of the problem I was referencing.