画国旗,画等边三角形

南笙酒味 提交于 2020-08-05 10:13:10

#画国旗
import turtle
turtle.speed(5)
turtle.setup(800,600)
turtle.pensize(6)
turtle.pencolor("brown")




turtle.penup()
turtle.goto(-350,-300)
turtle.pendown()
turtle.left(90)


turtle.forward(50)
turtle.right(90)
turtle.forward(400)
turtle.right(90)
turtle.forward(50)



turtle.penup()
turtle.goto(-200,-250)
turtle.pendown()
turtle.left(180)
turtle.forward(50)
turtle.right(90)
turtle.forward(100)
turtle.right(90)
turtle.forward(50)







turtle.penup()
turtle.goto(-160,-200)
turtle.pendown()
turtle.left(180)
turtle.forward(400)
turtle.right(90)
turtle.forward(20)
turtle.right(90)
turtle.forward(400)







turtle.penup()
turtle.goto(-140,200)
turtle.pendown()
turtle.pencolor('red')
turtle.left(90)
turtle.forward(300)
turtle.right(90)
turtle.forward(200)
turtle.right(90)
turtle.forward(300)








#画等边三角形、

import turtle
turtle.pensize(10)
turtle.pencolor("red")

turtle.right(120)
turtle.forward(200)
turtle.right(120)
turtle.forward(200)
turtle.right(120)
turtle.forward(200)




标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!