+ 1

What's wrong with my code for discriminant?

import math a = float(input()) b = float(input()) c = float(input()) d = (b**2)-(4*a*c) if d < 0: print('Корней уравнения нет') elif d > 0:     n=(math.sqrt(d)-b)/(2*a) m=(-math.sqrt(d)-b)/(2*a)     print('Первый корень равен ','%.4f'%n) print('Второй корень равен ','%.4f'%m) elif d == 0:     n=(-b)/(2*a)     print('Корень равен ','%.4f'%n) input()

9th Apr 2022, 6:22 PM
Роман Мещеряков
Роман Мещеряков - avatar
3 Respuestas
+ 3
Since there are some invalid characters, you need to delete your elif statements and rewrite them.
10th Apr 2022, 6:32 AM
Simba
Simba - avatar
+ 1
Thx you simba
10th Apr 2022, 8:55 AM
Роман Мещеряков
Роман Мещеряков - avatar
0
I want to learn java script which is very amazing language
11th Apr 2022, 5:35 AM
Rana Saab
Rana Saab - avatar