Skip to content

Instantly share code, notes, and snippets.

@Pierian-Data
Created March 1, 2018 17:17
Show Gist options
  • Save Pierian-Data/66759a745e6b7f0daf85fa24243cd921 to your computer and use it in GitHub Desktop.
Save Pierian-Data/66759a745e6b7f0daf85fa24243cd921 to your computer and use it in GitHub Desktop.
def is_greater(x,y):
return x>y
@TheAppleDog
Copy link

def is_greater(a,b):
if a>b:
return True
else:
return False

@tinaren1029
Copy link

def myfunc(x,y):
if x>y:
return True
else:
return False

myfunc(4,3)
output:
True
myfunc(4,4)
output:
False
myfunc(4,6)
output:
False

@SyedaAnjumDS
Copy link

SyedaAnjumDS commented Sep 13, 2024

def greatnum(a,b):
if a>b:
return True
else:
return False

greatnum(10,20)

@Dk-legend
Copy link

def is_greater(x,y):
if x > y :
return True

else :
    return False

@DaRealAal
Copy link

def is_greater(num1, num2):
if num1 > num2:
return True
else:
return False

Copy link

ghost commented Nov 21, 2024

def is_greater(x,y):
return x>y

print(is_greater(5, 3)) # Output: True (5 > 3)
print(is_greater(2, 7)) # Output: False (2 < 7)
print(is_greater(10, 10)) # Output: False (10 is not greater than 10)

@celikmack
Copy link

def is_greater(a,b):
if a > b:
return True
else:
return False

@thethinker24
Copy link

Num = int(input("Enter number x "))
Num2 = int(input("Enter number y"))
def is_greater(x,y):
if x>y:
return True
else:
return False

check=is_greater(Num,Num2)
print(check)

@pritamvijan98
Copy link

def is_greater(x,y):
return x>y
Output:,
is_greater (20,50)
False
is_greater(100,40)
True

@joshi-bhaskar
Copy link

def is_greater(num1,num2):
    if num1 > num2:
        return True
    else:
        return False

@xomaralbayati289x
Copy link

def is_greater(x,y):
return x>y

@muhammadaqib508
Copy link

def is_greater(x,y):
return x>y

@vishall4
Copy link

def is_greater(x,y):
if x>y:
return True
else:
x<=y
return False

@Danielroy10
Copy link

def is_less(a,b):
return a<b
is_less(1,4)
True
is_less(4,1)
False

@bhuvi0209
Copy link

def num(x,y):
if x > y:
return True
else:
return False
result = num(85,65)
print(result)
print(type(result))

@katuri6kaushik
Copy link

1.def is_greater(a,b):

if a>b:
return a
else:
return b
print( is_greater(20,50))
2.
def is_greater(a,b):
if a>b:
print(f'a ={a} is greater than b')
else:
print(f'b={b} is greater than a')
result=is_greater(20,50)
print(result)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment