Pyquadratic
Description
A python package designed to facilitate the solving and manipulation of quadratic equations.
simplifyQuadratic()
Returns a simplified quadratic functions from the given input quadratic function.
Parameters
| Parameter | Type | Values |
|---|---|---|
| stdForm | str |
"2x^2+8x+2" |
Return type
str
Errors
- If the
stdFormvalue provided is not in the correct format a,Value Errorexception is raised.
realSolution()
Returns the solutions for a quadratic equation entered in the format ax^2+bx+c
Parameters
| Parameter | Type | Values |
|---|---|---|
| stdForm | str |
"2x^2+8x+2" |
Return type
float[2] or int[2]
Errors
- If the
stdFormvalue provided is not in the correct format, aValue Errorexception is raised. - If a real solution does not exist, a
Value Errorexception is raised.
toFactoredForm()
Returns the factored form of the corresponding standard form of quadratic equation
Parameters
| Parameter | Type | Values |
|---|---|---|
| stdForm | str |
"2x^2+8x+2" |
Return type
str
Errors
- If the
stdFormvalue provided is not in the correct format, aValue Errorexception is raised. - If a real solution does not exist, a
Value Errorexception is raised.
toVertexForm()
Returns the vertex form of the corresponding standard form of quadratic equation
Parameters
| Parameter | Type | Values |
|---|---|---|
| stdForm | str |
"2x^2+8x+2" |
Return type
str
Errors
- If the
stdFormvalue provided is not in the correct format, aValue Errorexception is raised.
pyquadratic._readString() (Private: for contributors only)
Returns the coefficients for an ax^2+bx+c string of a quadratic equation
Parameters
| Parameter | Type | Values |
|---|---|---|
| stdForm | str | "2x^2+8x+2" |
Return type
float[3] or int[3]
Errors
- If the
stdFormvalue provided is not in the correct format, aValue Errorexception is raised.
Instructions
Use the standard form ax^2+bx+c to use pyquadratic functions (Always assume = 0)
How to import:
Go to terminal and run:
pip install pyquadratic
In your python file, be sure to include:
from pyquadratic.pyquadratic import *
Now you will be able to use the functions included in the pyquadratic package!
How to Contribute to the Project:
How to Set Up the Virtual Environment
-
Fork the Repository.
-
Clone it to your local directory.
-
Go to terminal, locate the project directory, and run:
pip install pipenv. -
Run
pipenv shellto activate the virtual environment. -
Run
pipenv installto install all the required dependencies for developemnt.
How to Build
-
Before every build, make sure you delete
distandpyquadratic.egg-infodirectory. -
Update version number in
pyproject.tomlif approved. -
Go to terminal, locate the project directory, and run:
python -m buildorpython3 -m build.
How to Test
- Go to terminal, locate the project directory, and run:
pytest.
Team Members
Nicolas Izurieta: https://github.com/ni2050
Patrick Zhao: https://github.com/PatrickZhao0
Brad Yin: https://github.com/BREADLuVER
Yucheng Xu: https://github.com/Yucheng-XPH
Link to Package
Release files for pyquadratic 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyquadratic-1.0.4.tar.gz | 45.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyquadratic-1.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 76.7 kB
Release files / pyquadratic-1.0.4.tar.gz
| Download URL | pyquadratic-1.0.4.tar.gz |
|---|---|
| Size | 45.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c7dd3852bb33f5a756722ce824f76c62969185b7a66976d37021053413fbea84
|
|
BLAKE2b-256 checksum How to use checksums |
8725523cc6da9dc71303327e22bfff56a7823e9a8426b8c05bb07427a5fefa42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / pyquadratic-1.0.4-py3-none-any.whl
| Download URL | pyquadratic-1.0.4-py3-none-any.whl |
|---|---|
| Size | 31.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
894a802eb9949eb547ac5194bac8798725d916a63ab6fc8706c07a546ca74d91
|
|
BLAKE2b-256 checksum How to use checksums |
f0ad48127ef7f4136cd9a518762e39b489bea77ae2be402cf1cbf4525a1a2b89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|