Questions tagged [tabulate]
The tabulate tag has no usage guidance.
13
questions
0
votes
0
answers
8
views
Why can I not call my csv writer to writerow a tabulated csv file?
import tabulate
import sys
import csv
def main():
if len(sys.argv) == 1:
sys.exit('Too few command-line arguments')
elif len(sys.argv) > 2:
sys.exit('Too many command-line ...
0
votes
0
answers
35
views
Problems with Tabulate in Pset3 Runoff Question
I am having trouble wrapping my head around the tabulate function for the runoff problem in pset3. I know I need to add one to the candidate[i].votes array given that the preferences[][] for a voter ...
0
votes
0
answers
29
views
Problem Set 3: Runoff - Tabulate Errors
I get the following errors on check50:
:( tabulate counts votes when multiple candidates are eliminated
and
:( tabulate handles multiple rounds of preferences.
I have run debug50 but it gets me ...
0
votes
1
answer
53
views
What's wrong with my Tabulate, Find min and Print winner?
#include <cs50.h>
#include <stdio.h>
#include <string.h>
// Max voters and candidates
#define MAX_VOTERS 100
#define MAX_CANDIDATES 9
// preferences[i][j] is jth preference for voter ...
0
votes
1
answer
421
views
PSET3 Runoff - Tabulate (multiple candidates)
I am stuck at this error for hours, I would appreciate your help. There is two errors:
:) tabulate counts votes when all candidates remain in election
:) tabulate counts votes when one candidate is ...
0
votes
0
answers
142
views
My tabulate function won't work for multiple eliminated candidates
I dont know what to do. My tabulate function won't work for multiple eliminated candidates and multiple rounds of preferences. The rest is fine, as check50 states:
:) tabulate counts votes when all ...
0
votes
1
answer
127
views
cs50 pset3 runoff tabulate function help
I have been stuck at the tabulate function for quite some time, I'm able to code all the other functions except for this tabulate functions.
If possible do help me look to see what wrong with the ...
0
votes
2
answers
352
views
Runoff Help: Tabulate Handles Multiple Rounds of Preferences
I cannot figure out why I am getting rejected on check50 for ":( tabulate handles multiple rounds of preferences - tabulate function did not produce correct vote totals". I get green ...
0
votes
1
answer
339
views
CS50 Runoff Tabulate
So I have been working on the tabulate function and Check50 says that the function is correct and it does properly work when no candidate is eliminated and when one is eliminated, but not when ...
0
votes
1
answer
123
views
Pset 3 runoff. Votes not updating, trying to understand the code sequencing
Ok so im stuck on the tabulate funtion in runoff for pset3.
The issue im having is that when i call to "printf" the candidates vote counts the votes still come out as 0. So i dont think the ...
0
votes
1
answer
97
views
Pset3 runoff tabulation error
[![enter image description here][1]][1]
I keep getting a tabulation error with check50 that I cannot replicate
11 voters, 4 candidates, 3 or 4 rounds of voting works fine with I run it, and debug50 ...
0
votes
1
answer
77
views
cs50 pset3 runoff tabulate - why you say candidates[i].votes = 0 ; here?
why use that ??
for (int i = 0; i < candidate_count; i++)
{
candidates[i].votes = 0;
}
}
return 0;
1
vote
1
answer
848
views
tabulate doesn't count votes when multiple candidates are eliminated
for (int i = 0; i < voter_count; i++)
{
// vote for top-preferred candidate if possible
if (candidates[preferences[i][0]].eliminated == false)
{
candidates[preferences[i][0]]....