Game of life Need help on function randomCells Using python
Game of life
Need help on function randomCells
Using python 2.7x
Solution
Game.py
#!/usr/bin/python
import random
mat=[][]
for i in range(0,10):
for j in range(0,10):
if i==0 or j==0 or j==9 or i==9:
mat[i][j]=0
else:
mat[i][j]=random.choice([0,1])
![Game of life Need help on function randomCells Using python 2.7xSolutionGame.py #!/usr/bin/python import random mat=[][] for i in range(0,10): for j in range(0, Game of life Need help on function randomCells Using python 2.7xSolutionGame.py #!/usr/bin/python import random mat=[][] for i in range(0,10): for j in range(0,](/WebImages/19/game-of-life-need-help-on-function-randomcells-using-python-1039126-1761539519-0.webp)