Computer Science, asked by neha866422, 5 months ago

) Write function def greater() which takes two parameters n and m and return greater from both . if both

numbers are equal function returns -1.​

Answers

Answered by jai696
3

\large\mathsf\color{pink}{Solution\: using\: python\: 3}

def greater(n, m):

if n == m:

return -1

return n if n > m else m

n, m = [int(n) for n in input("enter n m: ").split()]

print(greater(n, m))

\large\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Similar questions