Step 5
- If I input 10 for “How many registered voters were surveyed” and 10 voters voted for
Trarris, and 10 voters voted for Hump, it would be nonsensical because it will display
“100% say they will probably vote for Trarris” and “100% say they will probably vote
for Hump” without anyone predicted to win the election. The number of votes added up
exceeds the number of total votes, which doesn’t make sense
Step 6
- I changed the divide to a modulus in calculating the percentage, resulting in a logic error.
Everything will run fine, but the output would not be desired
Step 7
- At one place I introduced single quotation marks ‘ ’ for a string, and another mistake I
introduced is not putting a semicolon ; after a finished line of code. These result in
compile errors.