cs50 / problems

Checks for check50
142 stars 234 forks source link

'finance' instructions for 'quoted' endpoint could use clarification for edge case #261

Closed chriscarrollsmith closed 3 months ago

chriscarrollsmith commented 3 months ago

When I ran check50 on the 'finance' problem, it was failing me for the 'quote' endpoint because it couldn't find '28.00' in the page. This was frustrating, because the prices appeared to be displaying correctly for all the ticker symbols I tried. It took me quite a while to realize I needed to use a format string to enforce two decimal places when the price is a round-number dollar amount. Might be worth explicitly calling out in the instructions, as it's kind of a weird edge case and not very intuitive for a beginner to debug.

chriscarrollsmith commented 3 months ago

Just realized this is called out in the hints, and I just never look at the hints because I'm trying to avoid spoilers.