About 12,600,000 results
Open links in new tab
  1. Python program to solve quadratic equation - GeeksforGeeks

    Mar 20, 2024 · A quadratic equation is a polynomial equation of degree 2, which means it contains a term with a variable raised to the power of 2. It takes the form: ax 2 + bx + c = 0 where, a, b, and c are coefficient and real numbers and also a ≠ 0.

  2. python - Solving Quadratic Equation - Stack Overflow

    Mar 14, 2013 · Below is the Program to Solve Quadratic Equation. For Example: Solve x2 + 3x – 4 = 0. This quadratic happens to factor: x2 + 3x – 4 = (x + 4)(x – 1) = 0. we already know that the solutions are x = –4 and x = 1.

  3. Python Program to Solve Quadratic Equation

    Write a function to solve a quadratic equation. Define a function that takes three integers as input representing the coefficients of a quadratic equation. Return the roots of the quadratic equation. Hint: The quadratic formula is x = [-b ± sqrt(b^2 - 4ac)] / (2a). The term inside the square root, b^2 - 4ac, is called the discriminant.

  4. Python Program For Solving Quadratic Equation (With Code) - Python

    In this tutorial, we explored how to solve quadratic equations using a Python program. We covered the quadratic formula, the discriminant, and the logic behind handling different scenarios. By implementing the code provided and testing it with various inputs, you can efficiently solve quadratic equations and obtain the roots.

  5. Quadratic Formula in Python: A Comprehensive Guide

    6 days ago · The quadratic formula is a fundamental concept in algebra used to solve quadratic equations of the form (ax^{2}+bx + c = 0), where (a), (b), and (c) are coefficients and (aneq0). In Python, implementing the quadratic formula allows us to solve such equations programmatically. This blog post will explore how to use Python to calculate the roots of quadratic equations, covering the basic ...

  6. 4 Easy Ways to Solve Quadratic Equations in Python - GeeksVeda

    Sep 6, 2023 · How to Solve Quadratic Equations in Python. In order to solve the quadratic equation in Python, you can use: The Quadratic Formula; Factoring Quadratic Equations; Completing Square Method; The Graphical Method; Let’s check out each of the listed approaches individually! 1. Using Quadratic Formula

  7. Python Program to Solve Quadratic Equation - Naukri Code 360

    Mar 8, 2025 · In this article, we will learn how to write a Python program to solve a quadratic equation using the quadratic formula and handle different types of roots.

  8. Python program to solve quadratic equation - Tpoint Tech - Java

    Sep 5, 2024 · We can get the solution of the quadric equation by using direct formula. Let's understand the following example. Above formula consists of the following cases. If b 2 < 4ac, then the roots are complex (not real). For example - x 2 + x + 1, roots are …

  9. Python Program To Solve Quadratic Equations (With Code …

    The basic logic when writing a Python program to solve quadratic equations involves using the quadratic formula to calculate discriminant (D). Then, use D to determine the nature and value of the roots.

  10. The Easiest Way to Solve Quadratic Equation using Python

    Sep 8, 2021 · For solving the quadratic equation, we can directly apply the formula to find the roots. The formula to find the roots of the quadratic equation is: x = (−b ± √(b 2 − 4ac)) / 2a

Refresh