MacSG

IntroLab5_3

Feb 25th, 2015
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. def discriminant(a,b,c):
  2. return ...
  3.  
  4. def find_root(d,a,b):
  5. if d...:
  6. print("There are two complex roots.")
  7.  
  8. elif d...:
  9. root = ...
  10. print("There is one real root which is %d."%root)
  11.  
  12. elif d...:
  13. root1 = ...
  14. root2 = ...
  15. print("There are two real roots which are %d and %d."%(root1,root2))
  16.  
  17. else:
  18. ...
  19.  
  20. #####################################################
  21.  
  22. a = int(input("Enter a: "))
  23. b = int(input("Enter b: "))
  24. c = int(input("Enter c: "))
  25.  
  26. d = discriminant(a,b,c)
  27. find_root(d,a,b)
Advertisement
Add Comment
Please, Sign In to add comment