I am trying to create a function which will give me 70 random coordinate points. This is the code I have now:
# Generate test data
points = []
for _ in range(70):
x = random()
y = random()
points.append((x, y))
print(points)
but the code I have creates an output such as: [(0.4107139467174139, 0.3864211980981259)] [(0.4107139467174139, 0.3864211980981259), (0.6159949847158482, 0.6526570064673685)] [(0.4107139467174139, 0.3864211980981259), (0.6159949847158482, 0.6526570064673685), (0.6515694521853568, 0.9651948000023821)] ...
I have also tried:
# Generate test data
cord_set = []
for _ in range(70):
x = random()
y = random()
cord_set.append((x, y))
print(cord_set)
With similar results.
random()are you even calling? The title of your question isn't even a question - try rephrasing it to state what specifically is wrong. See How to Ask