An open API service indexing awesome lists of open source software.

https://github.com/amir13872/hi-quadratic-

This Python script defines a simple quadratic equation calculator that calculates the roots of a quadratic equation based on user input. It also provides a visual representation of the quadratic function using a graph.
https://github.com/amir13872/hi-quadratic-

complex-numbers mathematical-functions mathematics mathematics-education matplotlib numpy python-calculator quadratic-equation-solver

Last synced: 4 months ago
JSON representation

This Python script defines a simple quadratic equation calculator that calculates the roots of a quadratic equation based on user input. It also provides a visual representation of the quadratic function using a graph.

Awesome Lists containing this project

README

        

# Hi-Quadratic-
![image](https://github.com/amir13872/Hi-Quadratic-/assets/83335541/3e190036-7f5d-466d-8c90-32102df67875)

# Quadratic Equation Solver and Graph Plotter

This program solves quadratic equations and plots their corresponding graphs. It utilizes the `numpy`, `matplotlib`, and `cmath` libraries.

## Usage

To run the program, execute the `ax.py` file. You'll be prompted whether you want to continue or not. By entering `yes`, you can input the quadratic equation coefficients and it will be solved and graphically represented.

## Important Notes

- The coefficients of the quadratic equation should be entered in the form `ax^2 + bx + c`.
- If the coefficient `a` is equal to zero, an error message will be displayed.
- If the discriminant `delta` is negative, complex roots and the absence of real solutions will be displayed.
- If invalid inputs are entered, an error message will be displayed.

## Installation

To install the required dependencies, use the following commands:
```sh
pip install numpy matplotlib cmath platform
```
Run
```sh
python ax.py
```

## Supported Operating Systems

The program has been tested on both Windows and Linux operating systems.

## Example

```python
Enter a = 1
Enter b = -3
Enter c = 2
delta = 1.0
x1 = 2.0
x2 = 1.0
```

## Thanks
Special thanks to the esteemed Professor **Hamidreza Abbaszadeh Darban** for his invaluable contributions and guidance.