Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

python lists ########################## # this script creates a set of points with x and y co-ordinates. i want to pick import random Ax=[] num_of_points=13 for

python lists

########################## # this script creates a set of points with x and y co-ordinates. i want to pick import random Ax=[] num_of_points=13 for i in range(num_of_points): c=random.randrange(20,300) Ax.append(c) print (Ax) Ay=[] num_of_points=13 for i in range(num_of_points): c=random.randrange(20,300) Ay.append(c) print (Ay) chosen_points=random.randrange(1,num_of_points,1) print(str(chosen_points)+" = random point")

tick = 10000000000000 ax1=[] for i in range(tick): for [chosen_point] in Ax: #like [i] but the random point chosen in x ax1.append[A] ## print x and y for chosen point. each time it runs

image text in transcribed

# this script creates a set of points with x and y co-ordinates. i want to pick import random Ax [] this script describes 13 points with 2 lists. 1 for list each x and v co-ordinate num of points-13 for i in range (num_of_points) c-random.randrange (20,300) Ax.append (c) print (Ax) Ay [] num of points-13 for i in range (num_of_points) t then choses a number between 1 and 13 c-random.randrange (20,300) Ay.append (c) print (Ay) chosen points-random.randrange (1,num of points,1) print (str (chosen_points) +"random point") and i want to find the x and y co-ordinate for that particular chosen point tick - 10000000000000 for i in range (tick): for [chosen point] in Ax: #like [1] but the random point chosen in x ax1.append [A] print x and y for chosen point. each time it runs

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

More Books

Students also viewed these Databases questions

Question

Myrna Talefiero is this organizations president elect.

Answered: 1 week ago