def findMaximum(x, y):
max2 = 0
if(x > y):
max2 = x
max2 = y
return max2
print(findMaximum(2, 3))
this will only work if y is max. If you change the print statement y value to 1 it will return 1. max2=y needs to be in else statement.
def findMaximum(x, y):
max2 = 0
if(x > y):
max2 = x
max2 = y
return max2
print(findMaximum(2, 3))
this will only work if y is max. If you change the print statement y value to 1 it will return 1. max2=y needs to be in else statement.
Hi Grishm_Patel,
This is Anum from Educative.
This has been fixed.
We hope Educative has inspired to further your learning.
Best Regards,
Anum | Developer Advocate
educative.io