# File: ChapterGraphics/shape0.py # draws myfunction points from graphics import * def myfunction (x,m,b) : # y=mx+b return (m*x + b) def main(): win = GraphWin( "Draws 50 points start(10, 20)" ,300,300 ) for i in range(50): p = Point(i,myfunction(i,2,3)) #y=2x+3 p.draw(win) msg = Text( Point(150,275), "Line y = 2x + 3" ) msg.draw( win ) main()