Coder Social home page Coder Social logo

hrosicka / quadraticequationsolver Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 435 KB

Quadratic equations made easy! Enter coefficients, see the equation, roots, and graph - all in one place!

License: MIT License

Python 100.00%
gui python python3 quadratic-equations validator unit-test desktop-application graph-python quadratic-equation-solver math-equation math-equation-solver math-equations complex-numbers complex-roots discriminant design qss-design

quadraticequationsolver's Introduction

QuadraticEquationSolvePlot

Quadratic equations made easy!

  • Enter the coefficients and let us do the rest.
  • We'll show you the assembled equation.
  • Calculate the discriminant and roots.
  • Visualize the parabola with a graph.

Visualizes the Solution

This program isn't just limited to solving quadratic equations; it can also visualize them! The code utilizes the matplotlib library to generate a graph of the equation based on the user's input. This graphical representation can be particularly helpful in understanding the relationship between the coefficients and the solution's behavior.

Discriminant - 3 solution are possible

Distriminant: D = b^2 - 4ac

  • when dicriminant is positive, equation has two real solutions
  • when dicriminant is zero, equation has just one solution
  • when dicriminant is negative, equation has two complex solutions

Solution

Equation with 2 real roots

D > 0 -> 2 real roots

Equation with 1 real root

D = 0 -> 1 real root (Root1 = Root2)

Equation with 2 complex roots

D < 0 -> 2 complex roots

Input validation

Only integers

It is possible insert only integers.

Coefficient a must be non zero

Unit tests

Unit tests can be run using command python -m unittest

MIT LICENSE

quadraticequationsolver's People

Contributors

hrosicka avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.