Skip to main content

A package to create programming assignments

Project description

homework

This library lets you easily set up programing homeworks

A homework is defined as two files, one with some lines changed according to the language defined by the library (see the docs) and anotherone with the solution. The solution file is encrypted so that the student's do not have it.

The rules are simple instructions that you add as comments to your code. All commands are structured as follows ## homework:[cmd]:[flag]. Here is an example:

## homework:replace:on
#.dw = 
#.w = 
dw = compute_gradients()
w -= alpha * dw
## homework:replace:off

When parsing the above code, the API will produce a solution file encrypted and
the original code will be replaced with:
## homework:start
dw = 
w = 
## homework:end

Usage

First run python homework.py make testfile.py, which returns the encryption key and creates the following files:

  • testfile_homework.py, which contains some broken lines so that the students can fill the gaps.
  • testfile_solution.py, which is the encrypted version of the source file (testfile.py)

Now you could send your students testfile_homework.py and remove the original testfile.py while keeping the encryption key. This way only people with the key can uncover the solution to the homework, by entering python homework.py uncover testfile_solution.py [encryption key] in the terminal.

Future work

  • Support for defining homeworks out of jupyter notebooks
  • Automatic grading
  • Perhaps something you want to suggest!

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

homework-0.0.4.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

homework-0.0.4-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file homework-0.0.4.tar.gz.

File metadata

  • Download URL: homework-0.0.4.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.3

File hashes

Hashes for homework-0.0.4.tar.gz
Algorithm Hash digest
SHA256 b1ca43922b950bd71047f01f0f09d26e81d63225eca77268f81ca2a9dd078964
MD5 230caf60d766d2bb5c70665bc69de804
BLAKE2b-256 c4e58494ed09c7e621eaf56243f96ca34a441c6a8629a80962fbc17506abe910

See more details on using hashes here.

File details

Details for the file homework-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: homework-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.3

File hashes

Hashes for homework-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 71e144a97d5fe81a66053853455ad36812c973bbdc0256409fdfaebb6a13353e
MD5 d810b092dca4efd6e8b9cac456cd5ce7
BLAKE2b-256 a612759ca2d03b0c1974ab18d2f250f17148e1af29d2448b64bfec91ac173d58

See more details on using hashes here.

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