【python】 turtle画三角形

【python】 turtle画三角形,第1张

【python】 turtle画三角形 【python】 turtle画三角形
import turtle
turtle.setup(650,350,200,200)
turtle.pensize(1)
turtle.seth(60)
turtle.fd(40)
turtle.fd(40)
turtle.seth(-60)
turtle.fd(40)
turtle.fd(40)
turtle.seth(-180)
turtle.fd(40)
turtle.fd(40)
turtle.penup()
turtle.seth(60)
turtle.fd(40)
turtle.pendown()
turtle.seth(0)
turtle.fd(40)
turtle.seth(-120)
turtle.fd(40)
turtle.seth(120)
turtle.fd(40)
turtle.exitonclick()

运行结果

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/5495904.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-12-12
下一篇2022-12-12

发表评论

登录后才能评论

评论列表(0条)

    保存