I was wondering if someone can clarify this line for me.
Create a function die(x) which rolls a
die x times keeping track of how many
times each face comes up and returns a
1X6 array containing these numbers.
I am not sure what this means when it says 1X6 array ? I am using the randint function from numpy so the output is already an array (or list) im not sure.
Thanks
np.random.random_integers(0,5,size=x)rolls the diextimes (faces are represented by numbers from0to5including).np.bincount()returns the number of occurrences of each value in the array i.e., how many times each face comes up.Example