Created
March 9, 2015 04:23
-
-
Save rakeshsukla53/a5da414a63fce8571cd1 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
import numpy as np | |
import random | |
def one_to_five(): | |
two_D_array = np.array([[1, 2, 3, 4, 5], [6, 7, 1, 2, 3], [4, 5, 6, 7, 1], [2, 3, 4, 5, 6], [7, 0, 0, 0, 0]], int) | |
x = random.randrange(1, 6, 1) | |
y = random.randrange(1, 6, 1) | |
return two_D_array[x-1][y-1] | |
print one_to_five() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment