fork(1) download
  1. import math
  2. a=int(input("Введите а"))
  3. b=int(input("Введите b"))
  4. c=int(input("Введите с"))
  5. print("Находим дискриминант - D")
  6. print("D = b**2 - 4ac")
  7. print("Подставляем значения")
  8. d=b ** 2 - 4 * a * c
  9. if d == 0:
  10. print("Дискриминант равен 0 и имеет два одинаковых корня")
  11. elif d > 0:
  12. print("Дискриминант больше 0 и имеет два разных корня")
  13. else d < 0:
  14. print("Дискриминант меньше ноля. Уравнение корней не имеет.")
  15. input("Выход. Нажмите Enter...")
  16. exit
  17. print ("Дискриминант равен" + d)
  18. print("Вычисляем корни x1 и x2")
  19. x1=-b + sqrt(d) / 2 * a
  20. x2=-b - sqrt(d) / 2 * a
  21. print("Корень x1 =" + x1)
  22. print("Корень x2 =" + x2)
  23. input("Нажмите Enter...")
  24. # your code goes here
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Traceback (most recent call last):
  File "/usr/lib/python3.2/py_compile.py", line 119, in compile
    optimize=optimize)
  File "./prog.py", line 13
    else d < 0:
         ^
SyntaxError: invalid syntax

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.2/py_compile.py", line 123, in compile
    raise py_exc
py_compile.PyCompileError:   File "./prog.py", line 13
    else d < 0:
         ^
SyntaxError: invalid syntax

stdout
Standard output is empty