Python program to convert temperature between Kelvin, Celsius, Fahrenheit, and Rankine to check students calcuations
- Free software: Apache Software License 2.0
- Documentation: https://ptct.readthedocs.io.
$ pip install ptct
Rather than installing the tool it can be run from a docker image.
$ docker run --rm alexgmoore/ptct 20 F K
Takes the following inputs:
- An input temperature
- An input unit of measure
- A target unit of measure
- An optional numeric response
The student’s response must match an authoritative answer after both the student’s response and authoritative answer are rounded to the ones place. The system indicates that the response is correct, incorrect, or invalid.
When given no response it will retrun the conversion result.
usage: ptct [-h] [-r RESPONSE] [-v] [-d] input units target
positional arguments:
input The value to convert
units The input units <K/R/F/C> long names also supported
target The targeted units <K/R/F/C> long names also supported
optional arguments:
-h, --help show this help message and exit
-r RESPONSE, --response RESPONSE
The student response to check
-v, --verbose Verbose logging
-d, --debug Debug logging
$ ptct 23 F C
-5.0
$ ptct 20 F C --response -6
correct
$ ptct 40 C F --response 100
incorrect
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.