Skip to content
Snippets Groups Projects
Commit 1506577d authored by Martin Mareš's avatar Martin Mareš
Browse files

min3: Alternativní řešení

parent 98a425c8
No related branches found
No related tags found
No related merge requests found
......@@ -6,5 +6,15 @@ def min2(x, y):
else:
return y
def min3(x, y, z):
return min2(min2(x, y), z)
def min3_alt(x, y, z):
if x <= y and x <= z:
return x
elif y <= x and y <= z:
return y
else:
return z
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment