Using the point and line classes described in section 72


Using the Point and Line classes described in Section 7.2, see page 78 of attachment draw an isosceles triangle with the following configuration:start = Point(1, 1)finish = Point(4, 5)l = Line(start, finish)l.draw(win)a triangle inthe graphics window using those three points. (100, 30)(50, 100) (150, 100)So I got my drawing box to work with the code but now stuckfrom graphics import*def main( ):win = GraphWin("Python Graphics", 500, 500)win.getMouse( )win.close( )main( )Then I go to put in a line just like they show in the book and I get a syntax errorstart1 = Point(100,30)finish1= Point(150,100) 1 = Line(start1, finish1)1.draw(win)At "draw"...I don't know. That seems right to me considering its straight from the text just with different coordinates.A colleague posted this to help. "I think I need to find where Python is installed on my local drive. So I opened up my Local disk (C:) and found the folder Python32. Double click that folder to enter, and find the "Lib" folder: note not to find the "libs" folder...that is wrong. Double click there to enter and find the "site-packages" folder. That is the folder that you want to place the graphics.py file into."It doesn't work for me can you help?I attachment the Python PDF document. Please convert to py file extension.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Using the point and line classes described in section 72
Reference No:- TGS01582409

Now Priced at $15 (50% Discount)

Recommended (97%)

Rated (4.9/5)