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)
Sur cette page du site, vous pouvez voir la vidéo en ligne Creating a program to solve quadratic equations with python durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur AI Coders Hub 20 février 2025, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 5 fois et il a aimé 0 téléspectateurs. Bon visionnage!