Create a 2-D array of 10 points where the x-coordinates and the y-coordinates can
take random integral values between 5 and 20.
import random
points = []
for i in range (10):
x = random.uniform(5, 20)
y = random.uniform(5, 20)
points.append([x, y])
print(points)
Comments
Leave a comment