cs50 / problems

Checks for check50
134 stars 227 forks source link

CS50P Week 4 psets "Guessing Game" and "Bitcoin Price Index" fail to exit if using main() function without if __name__ footer #211

Open Makaze opened 9 months ago

Makaze commented 9 months ago

The check50 for game.py runs into a timeout error if the user provided a main() function but did not include the if __name__ == "__main__": block before the main() call. Functions that run at the base level without defining main() can pass check50 without problems.

I think this should be noted in the pset page to avoid confusion.