mouse()
function to
read the (x,y) coordinate of a mouse click. Let's use this function and your newly found
knowledge about how to draw lines to create a simple
drawing program.
mouse()
function. When run, you are to click on the
drawing twice, once for each mouse()
function call. After the second click, a line should
appear between your two click points.
x1,y1=mouse()
x2,y2=mouse()
mouse()
lines, you need to put
in a statement to draw a line between (x1,y1) and (x2,y2). If you get this done,
then two clicks on the output screen will result in a line drawn between the two click points
Can you do it?