function - Fill Color Python Graphic (India Flag) -
i'm working on creating indian flag in graphwin graphics system in python. i'm missing code right now. when run code below, dark green covers white. when remove setfill('darkgreen') bottom, white shows fine, , doesn't cover else out. missing?
from graphics import * def main(): win = graphwin("india flag", 500, 500) pt = point(50,50) pt.draw(win) top = rectangle(point(260,100), pt) top.setfill('orange') top.draw(win) pt2 = point(50, 150) middle = rectangle(point(260,100), pt2) middle.setfill('white') middle.draw(win) pt3 = point(50, 200) bottom = rectangle(point(260,100), pt3) bottom.setfill('darkgreen') bottom.draw(win) main ()
any appreciated!
from graphics import * def main(): win = graphwin("india flag", 500, 500) pt = point(50,50) pt.draw(win) top = rectangle(point(260,100), pt) top.setfill('orange') top.draw(win) pt2 = point(50, 150) middle = rectangle(point(260,100), pt2) middle.setfill('white') middle.draw(win) pt3 = point(260, 200) bottom = rectangle(point(50,150), pt3) bottom.setfill('darkgreen') bottom.draw(win) main()
i following indian flag: