Quadratic equation in Python

By: Prof. Dr. Fazal Rehman | Last updated: February 3, 2024

Write a Program in Python to solve quadratic equations.

The formula of Quadratic equation

ax2+bx+c=0

  Output Enter FistNumber: 9 Enter SecondNumber: 3 Enter ThirdNumber: 4 The solution are (-0.16666666666666666-0.6454972243679028j) and (-0.16666666666666666+0.6454972243679028j)

Second Way: The direct formula of Quadratic equation

Output Enter FirstNumber:22 Enter SecondNumber:44 Enter ThirdNumber:77 Complex Roots -1.0 + i 69.57010852370435 -1.0 – i 69.57010852370435  

Leave a Comment

All Copyrights Reserved 2025 Reserved by T4Tutorials