rect rectangle(cornercorner rect setfill(colorrect draw(winreturn rect def main()win graphwin('pick colors' win yup(right side up coordinates redbutton makecoloredrect(point( ) 'red'winyellowbutton makecoloredrect(point( ) 'yellow'winbluebutton makecoloredrect(point( ) 'blue'winhouse makecoloredrect(point( ) 'gray'windoor makecoloredrect(point( ) 'white'winroof polygon(point( )point( )point( )roof setfill('black'roof draw(winmsg text(point(win getwidth()/ ),'click to choose house color 'msg draw(winpt win getmouse(if isinside(ptredbutton)color 'redelif isinside(ptyellowbutton)color 'yellowelif isinside(ptbluebutton)color 'blueelse color 'whitehouse setfill(colormsg settext('click to choose door color 'pt win getmouse(if isinside(ptredbutton)color 'redelif isinside(ptyellowbutton)color 'yellowelif isinside(ptbluebutton)color 'blueelse color 'whitedoor setfill(colorwin promptclose(msgmain(the only further new feature used is in the long return statement in isinside return isbetween(point getx()pt getx()pt getx()and isbetween(point gety()pt gety()pt gety()recall that python is smart enough to realize that statement continues to the next line if there is an unmatched pair of parentheses or brackets above is another situation with long statementbut there are no unmatched parentheses on line for readability it is best not to make an enormous long line that would run off your screen or paper more on flow of control