A simple CLI and Python package for converting between letter grades, percentages, and GPA.
Project description
quickgrade
quickgrade is a simple Python package and command-line tool for converting between letter grades, percentages, and GPA values.
It can be used directly in the terminal or imported into your own Python projects.
Features
- Convert percentage grades to letter grades
- Convert percentage grades to GPA values
- Convert letter grades to percentages
- Convert letter grades to GPA values
- Convert GPA values to percentages
- Convert GPA values to letter grades
- Includes an easy-to-use command-line interface
Installation
Install with pip:
pip install quickgrade
CLI Usage
After installing, you can use the quickgrade command in your terminal.
Convert a letter grade to a GPA
quickgrade --letter A --output gpa
Output:
GPA: 3.9
Convert a percentage to a letter grade
quickgrade --percent 95 --output letter
Output:
Letter: A
Convert a GPA to a percentage
quickgrade --gpa 3.7 --output percent
Output:
Percent: 91
CLI Arguments
| Argument | Description | Example |
|---|---|---|
--letter |
Input a letter grade | --letter A- |
--percent |
Input a percentage grade | --percent 95 |
--gpa |
Input a GPA value | --gpa 3.7 |
--output |
Choose the output type: letter, percent, or gpa |
--output letter |
Only one input type should be used at a time.
Python Usage
You can also import the conversion functions in Python.
from quickGrade.grades import percent_to_letter, percent_to_gpa
print(percent_to_letter(95))
print(percent_to_gpa(95))
Output:
A
3.9
Available Functions
percent_to_letter(percent)
percent_to_gpa(percent)
letter_to_percent(letter)
letter_to_gpa(letter)
gpa_to_percent(gpa)
gpa_to_letter(gpa)
Example
from quickGrade.grades import letter_to_percent, letter_to_gpa
letter = "B+"
print(letter_to_percent(letter))
print(letter_to_gpa(letter))
Output:
88
3.3
Grade Scale
The default grading scale is:
| Percent Range | Letter Grade | GPA |
|---|---|---|
| 97-100 | A+ | 4.0 |
| 93-96 | A | 3.9 |
| 90-92 | A- | 3.7 |
| 87-89 | B+ | 3.3 |
| 83-86 | B | 3.0 |
| 80-82 | B- | 2.7 |
| 77-79 | C+ | 2.3 |
| 73-76 | C | 2.0 |
| 70-72 | C- | 1.7 |
| 67-69 | D+ | 1.3 |
| 63-66 | D | 1.0 |
| 60-62 | D- | 0.7 |
| 0-59 | F | 0.0 |
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quickgrade-0.1.1.tar.gz.
File metadata
- Download URL: quickgrade-0.1.1.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23599c300cc1323dff05712bf97641ccaa303b56fafec8ed7e059cfc4c7c3bc8
|
|
| MD5 |
98ebbe35b569486e32598d7e45bbae8e
|
|
| BLAKE2b-256 |
8884a1ec6df5b5cc9a715ed1829ad6ba83ca5b1eac0461faecadc77ba75ed421
|
File details
Details for the file quickgrade-0.1.1-py3-none-any.whl.
File metadata
- Download URL: quickgrade-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49e5784a50adc18b83b7485a9f6fe5d0dd26747ef9bac65478a450f46501e0f4
|
|
| MD5 |
69b607d36105af749e2512341d1d8f28
|
|
| BLAKE2b-256 |
fadcc18bcadebb05fe4091289b488c9b0bcf02f411bc70e1902e7290709ce3e1
|