Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. def compare(left,right):
  2. if left > right:
  3. return left
  4. else:
  5. return right
  6.  
  7. varType = input()
  8. left = None
  9. right = None
  10.  
  11. if varType == "int":
  12. left = int(input())
  13. right = int(input())
  14. elif varType == "float" :
  15. left = float(input())
  16. right = float(input())
  17. else :
  18. left = input()
  19. right = input()
  20.  
  21. result = compare(left,right)
  22. print(result)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement