Plotting Two Points using vpython (Glowscript)

Our objective is to plot two points on a graph and to learn how to use vpython.
Fig 1. Two points. Point 1: (2,4) and Point2: (6,7).
You will then draw a straight line between the two points, and then extend the line to the y-axis.
Notes and Code Outcome
Create the first point at (2, 4): Create a sphere object with a variable name "p1" and two properties: the position is at the coordinate (2, 4), and the radius is 0.25 units.

              p1 = sphere(pos=vec(2,4,0), radius=0.25)
            
Add axes so you can see where things are. To draw lines you use a curve object and give the coordinates of points that will be connected by straight lines. The positions of the points are given in an array.

              p1 = sphere(pos=vec(2,4,0), radius=0.25)

              axes = curve(pos=[vec(0, 10, 0), vec(0, 0, 0), vec(10,0,0)])
            
Now add the second point at (6, 7)
Draw a line between the two points.
Show Notes ▼
Plot a point halfway between the two points (the midpoint).
Extend the line between the two points so it intercepts the y-axis.
Plot the following x and y values, and determine if the relation is a function.
xy
24
-31
5-3
47
03
-1-1
-23
-3-3
62
-7-2