generated from mwc/lab_scatter
finished writting the code for get_x_y_values
writing this code was a bit more difficult for me. I had to find a new way of thinking to solve the problems and when i was stuck I asked teachers, classmates and google. It was a combination of all of them that helped me
This commit is contained in:
18
transform.py
18
transform.py
@@ -62,14 +62,24 @@ def scale(value, domain_min, domain_max, range_min, range_max):
|
||||
def get_x_values(points):
|
||||
"Returns the first value for each point in points."
|
||||
|
||||
a, b, c = points
|
||||
x_points =[]
|
||||
for x, y in (points):
|
||||
x_points.append(x)
|
||||
|
||||
return(x_points)
|
||||
|
||||
|
||||
|
||||
|
||||
for x, y in points:
|
||||
return(x)
|
||||
|
||||
|
||||
def get_y_values(points):
|
||||
"Returns the second value for each point in points."
|
||||
|
||||
for x, y in points:
|
||||
return (y)
|
||||
a, b, c = points
|
||||
y_points =[]
|
||||
for x, y in (points):
|
||||
y_points.append(y)
|
||||
|
||||
return(y_points)
|
||||
|
||||
Reference in New Issue
Block a user