Python编出爱心的方法:首先打开代码编辑器;然后输入画爱心轮廓,并填充红色【pensize(1) pencolor('red')fillcolor('pink') speed(5) up() goto(-30, 100)down()】。
Python编出爱心的方法:
from turtle import * pensize(1) pencolor('red') fillcolor('pink') speed(5) up() goto(-30, 100) down() begin_fill() left(90) circle(120,180) circle(360,70) left(38) circle(360,70) circle(120,180) end_fill() up() goto(-100,-100) down()
相关免费学习推荐: python视频教程
以上就是Python如何编出爱心的详细内容!
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did78290
Python如何编出爱心
阅读:39次