Skip to main content

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!

  1. Install the module!
pip install CompleteTheSquare
  1. Import the module!
from CompleteTheSquare import CompleteTheSquare as cts

I have imported it as cts to make it easier

  1. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

CompleteTheSquare-1.2.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

CompleteTheSquare-1.2-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file CompleteTheSquare-1.2.tar.gz.

File metadata

  • Download URL: CompleteTheSquare-1.2.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.8.0 tqdm/4.60.0 CPython/3.8.9

File hashes

Hashes for CompleteTheSquare-1.2.tar.gz
Algorithm Hash digest
SHA256 abe5e9de4034e0ce13635ee300a0a77f5a233d0b1a83d34aad5fa6d18ed49e64
MD5 77887c7862ee4780f9b65c7738289fc1
BLAKE2b-256 d4d0d1d12ae49d7fbab596e43d863819b60b33c90df1d8724a663cf2e944a3a7

See more details on using hashes here.

File details

Details for the file CompleteTheSquare-1.2-py3-none-any.whl.

File metadata

  • Download URL: CompleteTheSquare-1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.8.0 tqdm/4.60.0 CPython/3.8.9

File hashes

Hashes for CompleteTheSquare-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 97ba355ec85fd1fc5dbf859c3f1e4f5d2c57462081872c68ab3ab6ba5c49956f
MD5 502236ee0de8eb37dec13fe61cebfdb3
BLAKE2b-256 2650ccfdeeda0a9ebfd0b6f1429b4eb8bb81c5e3865ea2082e1a6a50d947bcac

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page