Skip to main content

Handles skeletonization and deskeletonization of python code.

Project description

skeletonize

Handles skeletonization and deskeletonizaiton of programs. This allows for easily distributing assignments to students that contain skeleton code, and determining which parts of the skeleton they filled in after the fact, extracting blanks.

skeletonization

Skeletonization works by taking in a piece of code with "skeleton markers" as so:

def factorial(x):
    if <<<x == 0>>>:
        return <<<1>>>
    else:
        return <<<x>>> * <<<factorial(x - 1)>>>

and converting it into either a skeleton

def factorial(x):
    if ______:
        return ______
    else:
        return ______ * ______

or a solution

def factorial(x):
    if x == 0:
        return 1
    else:
        return x * factorial(x - 1)

reskeletonization

Reskeletonization works by taking a skeleton:

def factorial(x):
    if <<<x == 0>>>:
        return <<<1>>>
    else:
        return <<<x>>> * <<<factorial(x - 1)>>>

and a student solution:

def factorial(x):
    if not x:
        return 1
    else:
        return x * factorial(x)

and produces a reskeletonized program

def factorial(x):
    if <<<not x>>>:
        return <<<1>>>
    else:
        return <<<x>>> * <<<factorial(x)>>>

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

skeletonize-2.8.tar.gz (6.0 kB view hashes)

Uploaded Source

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