Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def discriminant(a,b,c):
- return ...
- def find_root(d,a,b):
- if d...:
- print("There are two complex roots.")
- elif d...:
- root = ...
- print("There is one real root which is %d."%root)
- elif d...:
- root1 = ...
- root2 = ...
- print("There are two real roots which are %d and %d."%(root1,root2))
- else:
- ...
- #####################################################
- a = int(input("Enter a: "))
- b = int(input("Enter b: "))
- c = int(input("Enter c: "))
- d = discriminant(a,b,c)
- find_root(d,a,b)
Advertisement
Add Comment
Please, Sign In to add comment