A Simple Python project to complete the square!
Project description
CompleteTheSquare
A Simple Python project to complete the square!
What is "Completing The Square"
Completing The Square is a method used in Mathematics to easily find the turning point of a quadratic on the graph.
It can also be used to find the roots (where it crosses the x-axis (x-intercept or y=0)), but the quadratic formula is more popular for this.
Read this to find out more!
Current version: 1.2 --> Tweaks to code Python version: 3.8
How to use!
- Install the module!
pip install CompleteTheSquare
- Import the module!
from CompleteTheSquare import CompleteTheSquare as cts
I have imported it as
cts
to make it easier
- Initialise your equation
eq = cts("x²+3x+2")
If you don't want to initialise an equation straight away, simply leave it as ""
4) Complete The Square!
eq.cts()
This will return the completed version (string)! Use print()
to print it!
5) Solve!
eq.solve()
This will return the solutions (list)! Use print()
to print it!
If you want to initialise the equation outside, do:
eq.equation = "2x²+6x+4"
What do I need to input?
You must input x
(lowercase).
You don't need to add the power ², there just needs to be something there.
x£ + 3x + 2 will give the same result as x² + 3x + 2 :P
Contributing
You can open a PR request on Github like I know what that means.
Thanks :P
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
Hashes for CompleteTheSquare-1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97ba355ec85fd1fc5dbf859c3f1e4f5d2c57462081872c68ab3ab6ba5c49956f |
|
MD5 | 502236ee0de8eb37dec13fe61cebfdb3 |
|
BLAKE2b-256 | 2650ccfdeeda0a9ebfd0b6f1429b4eb8bb81c5e3865ea2082e1a6a50d947bcac |