Skip to content

Commit 3da9775

Browse files
authored
Update Solving_quadratic.py
1 parent 260f2c5 commit 3da9775

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

codes_in_Aug2025/Solving_quadratic.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
print("General form of quadratic is: ax^2 + bx + c, where (a!=0).")
33
a = int(input("Enter the value for a: "))
44
if a == 0:
5-
print("a can't be equals to zero.")
5+
print("Error: 'a' can't be equals to zero.")
66
else:
77
b = int(input("Enter the value for b: "))
88
c = int(input("Enter the value for c: "))
@@ -29,4 +29,5 @@
2929
print("This quadratic have two real and distinct roots.")
3030
root1 = (-b + round(math.sqrt(d), 2))/(2*a)
3131
root2 = (-b - round(math.sqrt(d), 2))/(2*a)
32-
print(f"Which are \'{root1}\' and \'{root2}\'.")
32+
33+
print(f"Which are \'{root1}\' and \'{root2}\'.")

0 commit comments

Comments
 (0)