diff --git a/if-example-math.py b/if-example-math.py new file mode 100644 index 0000000..52d0421 --- /dev/null +++ b/if-example-math.py @@ -0,0 +1,12 @@ +import math +a = float(input('a:')) +b = float(input('b:')) +c = float(input('c:')) + +delta = b * b - 4 * a * c +if delta < 0: + print('Kök yok') +else: + x1 = (-b + math.sqrt(delta)) / (2 * a) + x2 = (-b - math.sqrt(delta)) / (2 * a) + print('x1 = {}, x2 = {}'.format(x1, x2)) diff --git a/sample.py~ b/sample.py~ deleted file mode 100644 index e69de29..0000000