check50 is a tool for checking student code. As a student you can use check50 to check your CS50 problem sets or any other Problem sets for which check50 checks exist. check50 allows teachers to automatically grade code on correctness and to provide automatic feedback while students are coding.
First make sure you have Python 3.6 or higher installed. You can download Python here.
check50 has a dependency on git, please make sure to install git if git is not already installed.
To install check50 under Linux / OS X:
pip install check50
Under Windows, please install the Linux subsystem. Then install check50 within the subsystem.
To use check50 to check a problem, execute check50 like so:
For instance, if you want to check CS50's Caesar problem from edX 2018 you call:
You can choose to run checks locally by passing the
--local flag like so:
check50 --local <owner>/<repo>/<branch>/<check>
For an overview of all flags run:
In check50 the actual checks are decoupled from the tool. You can find CS50’s set of checks for CS50 problem sets at /cs50/problems. If you would like to develop your own set of checks such that you can use check50 in your own course jump to Writing check50 checks.
Under the hood, checks are naked Python functions decorated with the
@check50.check decorator. check50 exposes several functions, see API docs, that allow you to easily write checks for input/output testing. check50 comes with three builtin extensions:
flask. These extensions add extra functionality for C, Python and Python’s Flask framework to check50’s core.
By design check50 is extensible. If you want to add support for other programming languages / frameworks and you are comfortable with Python please check out Writing check50 extensions.