Roots Of Quadratic Equation In Python | Python Practice 5 | Newtum Solutions

preview_player
Показать описание
In this session, we will write a program to find the square root of a quadratic equation. The roots of a quadratic equation are referred to by the symbols alpha (α), and beta (β). These roots of the quadratic equation are also called the zeros of the equation.

Practice while learning helps students to become good developers and improve their logical thinking. Hence we are bringing this practice series for you all. This will help clarify your doubts and get some good scores in your university and school exams.

#pythonpractice #pythontutorial #newtum #python #pythoncourse #pythonprogramming #pythonforbeginners #pythonforbeginners
Рекомендации по теме
Комментарии
Автор

Sir your explanation is excellent. Keep it up.

WardaWarda-owze
Автор

#solving quadratic eequation

a = int(input("Enter the value of a: "))
b = int(input("Enter the value of b: "))
c = int(input("Enter the value of c: "))

d = (b**2)-4*a*c

if d>0:
print("The roots are real and distinct.")
x1 = (-b+d**0.5)/2*a
x2 = (-b-d**0.5)/2*a
print("The roots are", x1, "and", x2)
elif d==0:
print("The roots are real and equal.")
x = (-b+d**0.5)/2*a
else:
print("The roots are imaginary.")

bikibharali