This commit is contained in:
2025-12-11 18:06:09 +05:00
parent bfa7413f9c
commit e98dd2f107
35 changed files with 0 additions and 0 deletions

17
operators_6.py Normal file
View File

@@ -0,0 +1,17 @@
a = float(input("Введите a: "))
b = float(input("Введите b: "))
c = float(input("Введите c: "))
D = b * b - 4 * a * c
if D < 0:
print("Уравнение не имеет действительных корней")
else:
if D == 0:
x = -b / (2 * a)
print(f"x = {x:.1f}")
else:
x1 = (-b + D ** 0.5) / (2 * a)
x2 = (-b - D ** 0.5) / (2 * a)
print(f"x1 = {x1:.1f}")
print(f"x2 = {x2:.1f}")