Workspace
Romero da Fonte/

Python Tests

0
Beta
Spinner
# Calculos do edX
import math


a = 2
b = -1
c = -4

sol_1 = -b + math.sqrt(abs(b**2 - 4*a*c))/(2*a)
sol_2 = -b - math.sqrt(abs(b**2 - 4*a*c))/(2*a)

print(sol_1)
print(sol_2)
res = 2*(sol_1**2) - sol_1 - 4
print(res)
  • AI Chat
  • Code