Open
Conversation
# Election Time | Requirement | Comments |---|--- | Well formatted code | You are using variable names like `g`, `m`, and `d`, these are not terribly meaningful. You also have some extraneous spacing like on line 36. You are also using 4-space indentation instead of 2-space indents. | Reads in votes | 👍 | Outputs the total for each candidate | 👍 | Determines the winner | 👍 | `Optional` Handle ties for a winner appropriately | NA | `Optional` Handle grammar of vote summary saying vote or votes appropriately | NA | `Optional` Handle write in votes | NA | `Optional` Consider how to handle more than 10 votes | NA | `Optional` Consider how to handle more than 3 candidates | NA ## Summary Nice work, you hit all the basic learning goals here. Consider if you used a hash with the candidate names as keys and the values being the vote count. Would that simplify things?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Election Time
g,m, andd, these are not terribly meaningful. You also have some extraneous spacing like on line 36. You are also using 4-space indentation instead of 2-space indents.OptionalHandle ties for a winner appropriatelyOptionalHandle grammar of vote summary saying vote or votes appropriatelyOptionalHandle write in votesOptionalConsider how to handle more than 10 votesOptionalConsider how to handle more than 3 candidatesSummary
Nice work, you hit all the basic learning goals here. Consider if you used a hash with the candidate names as keys and the values being the vote count. Would that simplify things?