Hide


#1

I want to know why using randint(0, len(board) - 1) instead of randint(0, len(board))


Hide
#2

These functions should return a random row index and a random column index from your board, respectively.
u r returning the index not the value and index starts from zero. so it should be length - 1.


#3

I don't understand that...
The value of len(board) is 5 not 6 so len(board) - 1 return 4, isn't ?


#4

3 posts were split to a new topic: Hide


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.