A woman in a futuristic suit sitting in a tunnel
![continuar = 1
def valorX (valorA, valorB, delta):
x1 = (-1 * valorB + delta) / (2*valorA)
x2 = (-1 * valorB - delta) / (2*valorA)
x = [x1,x2]
return x
print("Bem vindo ao algoritmo de calcular raizes do segundo grau")
while continuar == 1:
valorA = float(input("Coloque o valor de A "))
valorB = float(input("Coloque o valor de B "))
valorC = float(input("Coloque o valor de C "))
delta = (valorB*valorB) - 4*valorC*valorA
print("The delta value is", delta)
if delta > 0:
delta = delta ** 0.5
print("the roots of the equation are:",max (valorX(valorA, valorB, delta)),"e", min (valorX(valorA, valorB, delta)))
elif delta == 0:
delta = delta ** 0.5
print("The roots of the equation are the same, ou seja:", min(valorX(valorA, valorB, delta)))
else:
print("Therefore, there is no real root of the equation")
continuar = int(input("Digite 1 se deseja continuar, If not, digite 2: "))](https://image.cdn2.seaart.me/2024-05-04/coqoonle878c73cqdqog/6148d1ed8433b94847822d7ae6d81cecee46e778_high.webp)
Prompts
Copy
continuar = 1
def valorX (valorA
,
valorB
,
delta):
x1 = (-1 * valorB + delta) / (2*valorA)
x2 = (-1 * valorB - delta) / (2*valorA)
x = [x1
,
x2]
return x
print("Bem vindo ao algoritmo de calcular raizes do segundo grau")
while continuar == 1:
valorA = float(input("Coloque o valor de A "))
valorB = float(input("Coloque o valor de B "))
valorC = float(input("Coloque o valor de C "))
delta = (valorB*valorB) - 4*valorC*valorA
print("The delta value is"
,
delta)
if delta > 0:
delta = delta ** 0
.
5
print("the roots of the equation are:"
,
max (valorX(valorA
,
valorB
,
delta))
,
"e"
,
min (valorX(valorA
,
valorB
,
delta)))
elif delta == 0:
delta = delta ** 0
.
5
print("The roots of the equation are the same
,
ou seja:"
,
min(valorX(valorA
,
valorB
,
delta)))
else:
print("Therefore
,
there is no real root of the equation")
continuar = int(input("Digite 1 se deseja continuar
,
If not
,
digite 2: "))
INFO
Checkpoint & LoRA

Checkpoint
epiCRealism
#Sci-Fi
#Epic Characters
0 comment
0
0
0