Created
May 28, 2020 20:52
-
-
Save jadowdl/d365ccc0cc50f8b60dae374b01e31f73 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from random import * | |
positions = sample([1,2,3,4,5,6,7,8,9,10], 3) | |
positions.sort() | |
print(positions) | |
if positions[2] - positions[1] == 1 and positions[1] - positions[0] == 1: | |
print(0) | |
elif positions[2] - positions[1] == 2 or positions[1] - positions[0] == 2: | |
print(1) | |
else: | |
print(2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment