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

    Mar 20, 2024 · Using the cmath module to solve quadratic equations in Python. First, we have to calculate the discriminant and then find two solutions to the quadratic equation using cmath module. Python3

  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. Creating a quadratic solver in Python - Purple Frog Systems

    Feb 3, 2022 · In this blog post, I will be showing you how to create a python function that will solve any quadratic equation. Firstly, what is a quadratic equation? A quadratic is an algebraic equation that can be arranged as ax 2 + bx + c = 0 where a, b, c are known and a ≠ 0.

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

  7. How to Solve Quadratic Equations in Python | Delft Stack

    Mar 11, 2025 · This tutorial demonstrates how to solve quadratic equations in Python using various methods, including the quadratic formula, NumPy, and SymPy. Learn to effectively tackle these equations with clear code examples and detailed explanations, making it accessible for beginners and experienced programmers alike.

  8. Using Python to Solve the Quadratic Equation - Python Central

    In this example, we'll show you how to use Python to solve one of the more well-known mathematical equations: the quadratic equation (ax 2 + bx + c = 0).

  9. Quadratic Formula in Python: A Comprehensive Guide

    Apr 19, 2025 · 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 concepts, usage methods, common practices, and best practices.

  10. Write a Python Program to Solve Quadratic Equation

    In this tutorial, we will discuss how to solve a quadratic equation using Python programming language. To solve a quadratic equation using Python, we need to write a program that takes the values of a, b, and c as input, computes the roots of the equation, and displays the solutions.

Refresh