Need Help Fixing My Project Assignment

0
16
Asked By CreativeCoder92 On

Hey everyone! I need some help troubleshooting my project assignment. I've been working on it for a few weeks, and it's already graded, so there's no pressure for grades. However, I'm facing a few issues that I can't seem to resolve: the number of countries is incorrect, the USA Men's Gold medals for 2000 should actually be 20, and the event totals for different disciplines are all wrong. Plus, the Open column for each year is filled with zeros. If anyone has suggestions on how to fix these problems, I'd greatly appreciate it! You can check out my work here: https://codehs.com/sandbox/id/medals-project-LfGsQI

1 Answer

Answered By TechGuru88 On

It sounds like you're dealing with some common parsing issues with CSV files. When you split on commas, make sure you’re handling commas that may be enclosed in quotes. For instance, if your data includes names like "Gary Hall, Jr.", the split will get messed up. You might want to use a CSV parsing library that can intelligently handle these cases instead of a simple split function. That should help with the incorrect counts and totals you're seeing!

ProjectHelper17 -

Great point! Using a library could save you a lot of headaches. Just make sure to check the documentation for proper usage!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.