+ 1

Will this code run correctly in Python??

def mini(x, y): if x<=y: return x else: return y endif__ a = mini(2,3) print(a)

1st Oct 2017, 7:21 PM
Lizandro
Lizandro - avatar
3 odpowiedzi
+ 5
Yes, but 'endif__' is not a valid keyword, and the line containing it will never be reached ^^
1st Oct 2017, 10:57 PM
visph
visph - avatar
+ 1
Yes and will print 2
1st Oct 2017, 7:22 PM
Kartikey Sahu
Kartikey Sahu - avatar
+ 1
yeahh...endif__ does no make difference...
15th Oct 2017, 6:26 PM
Lizandro
Lizandro - avatar