Question: PYTHON Use array no 'for' 'if' statements no loops, use random integer function to find a spot in the array, repeat for 4 locations Create
PYTHON Use array no 'for' 'if' statements no loops, use random integer function to find a spot in the array, repeat for 4 locations
Create a 10 x 10 array to represent all the places that the "landmines" could be in yard. Randomly pick 4 locations of the array (it's allowed if you pick the same element twice). Update the array to indicate where and how many "landmines" are in each location. To pick a random integer use the randint() function from the random module (the random module should already be installed). Finally, print out the array to show the locations.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
