Skip to content

Instantly share code, notes, and snippets.

@rakeshsukla53
Created March 9, 2015 04:23
Show Gist options
  • Save rakeshsukla53/a5da414a63fce8571cd1 to your computer and use it in GitHub Desktop.
Save rakeshsukla53/a5da414a63fce8571cd1 to your computer and use it in GitHub Desktop.
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