turtle 绘制图形
 心型如何绘制
  版 本:anaconda5.2.0(python3.6.5)
 编辑器:pycharm 社区版
 turtle是内置库,解释器里面有的,不需要安装
turtle提供有基本的图形绘制:点、线、圆
代码import turtle t = turtle.Turtle()t.speed(1)t.pensize(2)t.color('red', 'red')t.begin_fill()# 往左偏 45 度角t.left(45)# 绘制线长 200t.fd(200)# 100 半径 180 度角t.circle(100, 180)# 往右偏 90度t.right(90)# 100 半径 180 度角t.circle(100, 180)t.fd(200)t.end_fill()input()
  效果图
 
 只要你想,什么都可以画出来
 
 
 学习更多知识