Answer to Question #288442 in Python for Chetan

Question #288442

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.

1
Expert's answer
2022-01-18T08:37:57-0500
import random

points = []

for i in range (10):
    x = random.uniform(5, 20)
    y = random.uniform(5, 20)
    points.append([x, y])

print(points)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS