Advertisement
Guest User

Untitled

a guest
Oct 4th, 2015
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. import random
  2. import math
  3. def main():
  4. #have the user input three numbers
  5. a, b, c = eval(input("Please input three numbers separated by commas: "))
  6.  
  7. #make an if then statement sorting the three variables from highest to lowest
  8. #if statement when a is the highest value
  9. if(a > (b and c) and (b > c)):
  10. print(a, b, c)
  11. else:
  12. print(a, c, b)
  13.  
  14. #if statement when b is the highest value
  15. if(b > (a and c) and (a > c)):
  16. print(b, a, c)
  17. else:
  18. print(b, c, a)
  19.  
  20. #if statement when c is the highest value
  21. if(c > (a and c) and (a > b)):
  22. print(c, a, b)
  23. else:
  24. print(c, b, a)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement