Steve and Maurice have racing snails. They each have three, a slow s, medium m and fast f one. Although Steve's snails are all a bit stronger than Maurice's, Maurice has a trick up his sleeve. His plan is:
[s, f] Sacrifice his slowest snail against Steve's fastest.[m, s] Use his middle snail against Steve's slowest.[f, m] Use his fastest snail against Steve's middle.Create a function that determines whether Maurice's plan will work by outputting True if Maurice wins 2/3 games.
The function inputs:
[s, m, f] for Maurice.[s, m, f] for Steve.maurice_wins([3, 5, 10], [4, 7, 11]) ➞ True
# Since the matches are (3, 11), (5, 4) and (10, 7), Maurice wins 2 out of 3.
maurice_wins([6, 8, 9], [7, 12, 14]) ➞ False
# Since the matches are (6, 14), (8, 7) and (9, 12), Steve wins 2 out of 3.
maurice_wins([1, 8, 20], [2, 9, 100]) ➞ True
[f, s, m].