Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CS50x tideman - Add More Details to print_winner Function #314

Open
Stefanelll opened this issue Mar 8, 2025 · 0 comments
Open

CS50x tideman - Add More Details to print_winner Function #314

Stefanelll opened this issue Mar 8, 2025 · 0 comments

Comments

@Stefanelll
Copy link

Hello!

At the print_winner function, I noticed that check50 only checks for one specific output format:
printf("%s\n", name);

For example, if I use:
printf("The winner of the election is %s\n", name);

check50 returns an error, even though the output conveys the same information. This isn't a bug in check50 for Tideman, as it is designed to check only for the expected format.

It would be helpful if the CS50x course page provided a clearer explanation of the expected output format in the print_winner function.
Currently, the instructions on the course page (CS50 Tideman Problem) state:

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.

I suggest updating it to:

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. Your program should output only the candidate's name followed by a newline (\n).

This small clarification could help avoid confusion for future students.

Thanks!

@Stefanelll Stefanelll changed the title Add More Details to print_winner Function CS50x tideman - Add More Details to print_winner Function Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant