import turtle as t def pic(color,x,y,r): t.width(10) t.color(color) t.penup() t.goto(x,y) t.pendown() t.circle(r) t.hideturtle() if __name__ == "__main__": pic("blue",-180,0,50) pic("black",-60,0,50) pic("red",60,0,50) pic("yellow",-120,-50,50) pic("green",0,-50,50) t.penup() t.goto(-90,-80) t.pendown() t.color("red") t.write("奥运五环") t.done()
效果图:
来源:https://www.cnblogs.com/liaozhidan/p/12243501.html