python function to do comparison between two numbers

Solutions on MaxInterview for python function to do comparison between two numbers by the best coders in the world

showing results for - "python function to do comparison between two numbers"
Candace
14 Feb 2019
1def comparison(x,y)-> int:
2    if x > y:
3        result = x," is grater than ",y
4    elif x < y:
5        result = x," is less than ",y
6    elif x == y:
7        result = "Both numbers are equal are equal"
8    return result
9print(comparison(90,90))
Lisa
16 Jul 2018
1if 5 > 2:
2	print("Five is greater than two!")
3