Fill Python Two-Dimensional Array with Random Functions

Asked 1 years ago, Updated 1 years ago, 101 views

There is a condition that you declare a two-dimensional array and put a number in it. Horizontal, vertical, and diagonal all have to be 3*3 arrays with a sum of 15. I don't know the process of putting it in using random function.

You have only created the current array.

def Create_array():
    array = [[0 for col in range(10)] for row in range(10)]
    for i in range(10):
        array[i][i] = 1

python-2.7

2022-09-22 14:44

1 Answers

I think you're talking about the horse defense problem just by listening to the explanation of the problem. Check out the following links.


2022-09-22 14:44

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.