add exs
This commit is contained in:
1 parent
6361168409
commit
bfac007c85
9 files changed
+118
No files matched your search
@@ -0,0 +1,20 @@
|
||||
from math import sqrt
|
||||
a = int(input("a : "))
|
||||
b = int(input("b : "))
|
||||
c = int(input("c : "))
|
||||
|
||||
delta = (( b - a ) ** 2) - (4 * (c - 3))
|
||||
|
||||
if delta < 0 :
|
||||
print("pas d'inté")
|
||||
elif delta == 0 :
|
||||
x = (-1 * (b - a)) / 2
|
||||
y = a * x + 3
|
||||
print("1 inté x :", x, " y :", y)
|
||||
else :
|
||||
x1 = (-1 * (b - a) - sqrt(delta)) / 2
|
||||
x2 = (-1 * (b - a) + sqrt(delta)) / 2
|
||||
|
||||
y1 = (a * x1) + 3
|
||||
y2 = (a * x2) + 3
|
||||
print("2 inté : x1 :", x1, " y1 :", y1, " x2 :", x2, " y2 :", y2)
|
||||
Reference in new issue
Block a user