A callable Python package that solves and explains quadratic equations.
Project description
pyquadraticsolution
pyquadraticsolution is a simple, intuitive, and callable Python package for solving quadratic equations.
Just import it and pass the coefficients — it returns the roots and explains their nature!
🚀 Features
- ✅ Callable package (
pyquadraticsolution(a, b, c)) - ✅ Solves:
- Real and distinct roots
- Real and repeated roots
- Complex roots
- ✅ Handles linear equations when
a = 0 - ✅ No external dependencies
📦 Installation
pip install pyquadraticsolution
Usage
Example 1: Two real and distinct roots
import pyquadraticsolution
print(pyquadraticsolution(1, -3, 2))
Output:
The solutions are real and distinct: x1 = 2.0, x2 = 1.0. Reason: Discriminant is positive, which indicates two real roots.
Example 2: One real and repeated root
import pyquadraticsolution
print(pyquadraticsolution(1, -2, 1))
Output:
The solution is real and repeated: x = 1.0. Reason: Discriminant is zero, indicating a repeated real root.
Example 3: Complex roots
import pyquadraticsolution
print(pyquadraticsolution(1, 2, 5))
Output:
The solutions are complex: x1 = -1.0 + 2.0i, x2 = -1.0 - 2.0i. Reason: Discriminant is negative, indicating complex roots.
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 pyquadraticsolution-0.1.0.tar.gz.
File metadata
- Download URL: pyquadraticsolution-0.1.0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a8eaf514f93b980a2bdd901a562ac8fe7ccd355770807487ddabaeac074e5d7
|
|
| MD5 |
07c1eb273f8b42c5e389173630d321ae
|
|
| BLAKE2b-256 |
f205ce2c0b19ce721c487ffbb8c9b045a60632fb5028616af7e4033ecfdb67be
|
File details
Details for the file pyquadraticsolution-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyquadraticsolution-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5efc2b5accacb0aa09da7700f0f2bbdd3c655014b032cd551940d921c108cf3a
|
|
| MD5 |
d407d8c428705d2c1c5dce202aedb2e7
|
|
| BLAKE2b-256 |
34e607462b161a3a71b32ac6f9136c64c287b598bfcdb495d28fef0e9084e86a
|