mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-28 17:09:38 +07:00
11 lines
292 B
Python
11 lines
292 B
Python
import math
|
|
|
|
__author__ = 'wombat'
|
|
class SolverEquation:
|
|
def demo(self):
|
|
a = 3
|
|
b = 25
|
|
c = 46
|
|
root1 = (-b + <selection>math.sqrt(b ** 2 - 4 * a * c)</selection>) / (2*a)
|
|
root2 = (-b - math.sqrt(b ** 2 - 4 * a * c)) / (2*a)
|
|
print(root1,root2) |