writing a program that can solve quadratic equations and teach you how to code it in python. the code ( in one part of the code , for the rules i had to write "less then" instead of "less than" sign:
import math
a = int(input("please enter a= "))
b = int(input("please enter b= "))
c = int(input("please enter c= "))
delta = b*b-4*a*c
if delta == 0 :
x=(-b) / (2*a)
print("the equation has one answer")
elif delta less than zero :
print("the equation has no answer!")
else :
x1=(-b + math.sqrt(delta)) / (2*a)
x2=(-b - math.sqrt(delta)) / (2*a)
print("the equation has two answers", x1 , x2)
On this page of the site you can watch the video online Creating a program to solve quadratic equations with python with a duration of hours minute second in good quality, which was uploaded by the user AI Coders Hub 20 February 2025, share the link with friends and acquaintances, this video has already been watched 5 times on youtube and it was liked by 0 viewers. Enjoy your viewing!