Wednesday, 2 March 2022

Python Program To Draw a Line segment using Line Object

 SCREENSHOT



CODE

#Draw a line Segment using a Line object 


from graphics import *

def main():

    win = GraphWin('Draw Square',300,300)

    

    center = Point(100,100) 

    line=Line(Point(20,30),Point(180,165))

    line.draw(win)


main()

No comments:

Post a Comment