Skip to content

kik369/quadratic-equation-solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quadratic Equation Solver

Description

The quadratic-equation-solver is a Python script for solving quadratic equations. It can handle equations with real and complex roots, and it visualizes the equation on a graph.

Installation

To use this script, you'll need Python installed on your system along with a few additional libraries.

Prerequisites

  • Python 3.x
  • matplotlib
  • numpy

Setup

  1. Clone the repository:

    git clone https://github.com/kik369/quadratic-equation-solver.git
    
  2. Navigate to the cloned directory:

    cd quadratic-equation-solver
    
  3. (Optional) Create and activate a virtual environment using virtualenv:

    # First, install virtualenv if you haven't already
    pip install virtualenv
    
    # Create a virtual environment
    virtualenv env
    
    # Activate the virtual environment
    env\Scripts\activate  # On Windows
    source env/bin/activate  # On Unix or MacOS
    
  4. Install the required packages:

    pip install -r requirements.txt
    

Usage

Run the script by passing the coefficients of the quadratic equation as arguments:

python quadratic.py <a> <b> <c>

For example:

python quadratic.py 1 -5 6

This will solve the equation x² - 5x + 6 = 0.

Output

Figure_4 Figure_1 Figure_2 Figure_3

License

Distributed under the MIT License. See LICENSE for more information.

About

Solve and graph quadratic equations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages