Computer-v1 is a program that solves polynomial second or lower degree equations
Welcome to my Computor v1 math project repository! In this project, I've developed a Python program that solves polynomial equations of the second degree or lower. This project allowed me to explore mathematical problem-solving through programming and apply algebraic concepts practically.
The Computor v1 project focuses on creating an equation-solving program to handle polynomial equations. The program calculates the reduced form of the equation, its degree, and the solutions. The project aims to reinforce mathematical skills and demonstrate their application in a programming context.
- Ensure you have Python 3 installed on your system.
- Clone this repository to your local machine using:
bash git clone <repository-url>
- Navigate to the repository's directory:
cd computor-v1
- Run the Computor v1 program by providing an equation as a command-line argument.
python computor.py "5 * X^0 + 4 * X^1 - 9.3 * X^2 = 1 * X^0"
Reduced form: 4.0 * X^0 + 4.0 * X^1 - 9.3 * X^2 = 0
Polynomial degree: 2
Discriminant is strictly positive, the two solutions are:
X1 = -4.7106
X2 = 0.9052
The repository's structure is organized as follows:
computor-v1/
├── computor # Main Python script
└── README.md # Project README
The program reads and parses the input equation, calculates its reduced form, determines the equation's degree, and solves it. It handles linear and quadratic equations, displaying solutions accordingly.
For the bonus section, I added features to manage entry mistakes, handle free-form entries, display solutions as irreducible fractions when possible, and show intermediate steps in the equation-solving process.