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

    Mar 20, 2024 · Using the quadratic formula to Solve quadratic equations in Python. Using the direct formula Using the below quadratic formula we can find the root of the quadratic equation. [Tex]x=\frac{-b\pm \sqrt{b^2-4ac}}{2a} [/Tex] The values of the roots depend on the term (b2 – 4ac) which is known as the discriminant (D).

  2. python - Solving Quadratic Equation - Stack Overflow

    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 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.

  4. Quadratic Formula in Python: A Comprehensive Guide

    5 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 ...

  5. 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

  6. Write a Python program to solve quadratic equation - PySeek

    Feb 5, 2025 · In this tutorial, we will write a Python program to find the roots of a quadratic equation using the quadratic formula. Quadratic Formula. The solutions (roots) of the quadratic equation are given by the formula: \[x = (-b \pm \sqrt(b^2-4ac) \over 2a) \] The term b² – 4ac is called the discriminant, which determines the nature of the roots:

  7. Python Program For Quadratic Equation (With Code) - Python

    To solve a quadratic equation in Python, you can write a program that prompts the user for the coefficients of the equation (a, b, and c) and then applies the quadratic formula to calculate the roots.

  8. Solving Quadratic Equations with Python - Compucademy

    Python Program for Solving Quadratic equations. The program below is based on the famous quadratic equation formula. Input your values for a, b, and c from the equation in form ax² + bx + c = 0, and the (real) solutions will be displayed if there are any.

  9. 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.

  10. Python Program to Solve Quadratic Equation (or Find Roots)

    Learn How to Solve Quadratic Equations in Python with this comprehensive tutorial. Step-by-step examples and explanations will enhance your coding skills.

  11. Some results have been removed
Refresh