import turtle #调用turtle库绘制图像的函数库
turtle.color("blue") #颜色 蓝色
turtle.circle(100) #画半径100的圆
turtle.penup() #抬起笔
turtle.goto(-180,0) #移动到
turtle.pendown() #放笔
turtle.color("red") #颜色 红色
turtle.circle(100) #画半径100的圆
turtle.penup() #提起笔
turtle.goto(180,0) #移动到
turtle.pendown() #放下笔
turtle.color("yellow") #画黄色的圆
turtle.circle(100) #画半径100的圆
turtle.penup()
turtle.goto(80,-180)
turtle.pendown()
turtle.color("green")
turtle.circle(100)
turtle.penup()
turtle.goto(-80,-180)
turtle.pendown()
turtle.color("black")
turtle.circle(100)
turtle.done #让程序继续运行
利用Python 调用turtle函数库 绘制奥运五环。
猜你喜欢
转载自www.cnblogs.com/jimwis/p/11980294.html
今日推荐
周排行