A close up of a woman in a futuristic suit with a sword
![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/coqop3le878c73cqenk0/70c1b38ac85ebfd71ef4c4c1865991f74b66403b_high.webp)

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: "))
프롬프트
Copy prompts
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: "))
정보
Checkpoint & LoRA

Checkpoint
epiCRealism
#과학 소설
#에픽 캐릭터
0개의 댓글
0
0
0