今天突发奇想想学习python语言,靠这个绘制奥运五环提高了对python的兴趣。
首先看一下相关的教程,了解一些知识。
然后就上手敲,不懂没关系,这只是开始!!!
import turtle
turtle.width(10)
turtle.color("blue")
turtle.circle(50)
turtle.color("black")
turtle.penup()
turtle.goto(120,0)
turtle.pendown()
turtle.circle(50)
turtle.color("red")
turtle.penup()
turtle.goto(240,0)
turtle.pendown()
turtle.circle(50)
turtle.color("yellow")
turtle.penup()
turtle.goto(60,-50)
turtle.pendown()
turtle.circle(50)
turtle.color("green")
turtle.penup()
turtle.goto(180,-50)
turtle.pendown()
turtle.circle(50)
运行完成的结果:
感想:好强大好厉害,python真有趣!!!