编程语言
首页 > 编程语言> > Python蟒蛇绘制 MOOC 北理工 Python123

Python蟒蛇绘制 MOOC 北理工 Python123

作者:互联网

使用turtle库,绘制一个蟒蛇形状的图形。‪‬‪‬‪‬‪‬‪‬‮‬‫‬‫‬‪‬‪‬‪‬‪‬‪‬‮‬‭‬‪‬

import turtle as t
t.setup(800,600,150,150)
t.penup()
t.fd(-250)
t.pendown()
t.pensize(25)
t.pencolor("purple")
t.seth(-40)
for i in range(4):
    t.circle(40,80)
    t.circle(-40,80)
t.circle(40,80/2)
t.fd(40)
t.circle(16,180)
t.fd(40 * 2/3)
t.done()

题目转自:https://python123.io/index

标签:turtle,150,MOOC,Python,40,北理工,fd,circle,80
来源: https://blog.csdn.net/willing0228/article/details/115551480