filmov
tv
Python Program to Solve Quadratic Equation | Python Exercise | Python Problems

Показать описание
This program computes roots of a quadratic equation when coefficients a, b and c are known.
The standard form of a quadratic equation is:
ax2 + bx + c = 0, where
a, b and c are real numbers and
a ≠ 0
The solutions of this quadratic equation is given by:
(-b ± (b ** 2 - 4 * a * c) ** 0.5) / (2 * a)
We have imported the cmath module to perform complex square root. First, we calculate the discriminant and then find the two solutions of the quadratic equation.
You can change the value of a, b and c in the above program and test this program.
►TimeStamps:
Introduction: 00:00:00
Write the Code : 00:00:40
Mathematical Explanation : 00:01:34
Program Explanation : 00:04:26
Check Output : 00:08:14
✔ Learn Code with Sadik
omka - Vibes (Copyright Free Music)
AliveSound - Through The Sky (Copyright Free Music)
#python #pythonpractice #pythonexercise #program #programminexercise #c #java #javascript #apnacollege #codewithharry #code24 #learncode #codewithSadik
The standard form of a quadratic equation is:
ax2 + bx + c = 0, where
a, b and c are real numbers and
a ≠ 0
The solutions of this quadratic equation is given by:
(-b ± (b ** 2 - 4 * a * c) ** 0.5) / (2 * a)
We have imported the cmath module to perform complex square root. First, we calculate the discriminant and then find the two solutions of the quadratic equation.
You can change the value of a, b and c in the above program and test this program.
►TimeStamps:
Introduction: 00:00:00
Write the Code : 00:00:40
Mathematical Explanation : 00:01:34
Program Explanation : 00:04:26
Check Output : 00:08:14
✔ Learn Code with Sadik
omka - Vibes (Copyright Free Music)
AliveSound - Through The Sky (Copyright Free Music)
#python #pythonpractice #pythonexercise #program #programminexercise #c #java #javascript #apnacollege #codewithharry #code24 #learncode #codewithSadik