Skip to content

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.

Notifications You must be signed in to change notification settings

amir13872/Hi-Quadratic-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Hi-Quadratic-

image

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:

pip install numpy matplotlib cmath platform

Run

python ax.py

Supported Operating Systems

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

Example

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.

About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages