Advertisement
Guest User

Untitled

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