Skip to main content

Teaching with Python unit tests

Project description

This package provides a simple tool for checking answers to exercises in a Jupyter notebook.

Usage:

# Install the grader
!pip install ucamcl

# Log in to the grader. It will prompt you with a "log in" button.
GRADER = ucamcl.autograder('https://markmy.solutions', course='scicomp').subsection('notes1')

# Fetch a question. It will tell you what to do, with what parameters.
q = GRADER.fetch_question('ex5')
print(q)

# Prepare your answer and submit it.
myans = {'x': [i**2 for i in range(q['n'])]
is_correct, answer = GRADER.submit_answer(q, myans)

This package is what the student installs in their Jupyter notebook. The other half is a server that should be set up by the course instructor. Contact Damon Wischik <djw1005@cam.ac.uk> for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ucamcl-1.0.11.tar.gz (7.0 kB view hashes)

Uploaded Source

Built Distribution

ucamcl-1.0.11-py3-none-any.whl (18.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page