如何使用python画一只可爱的皮卡丘

  介绍

这篇文章将为大家详细讲解有关如何使用python画一只可爱的皮卡丘,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。

python有哪些常用库

python常用的库:1. requesuts; 2. scrapy; 3.枕头;4.扭曲;5. numpy; 6. matplotlib; 7. pygama; 8。ipyhton等。

<>强效果图

如何使用python画一只可爱的皮卡丘

# !/usr/bin/env  python    #,- *安康;编码:utf-8  - *   得到turtle  import  *   & # 39;& # 39;& # 39;   绘制皮卡丘头部   & # 39;& # 39;& # 39;   def 面对(x, y):   ,“““画脸”,“   ,begin_fill ()   ,penup ()   ,#将海龟移动到指定的坐标   ,转到(x, y)   ,pendown ()   ,#设置海龟的方向   ,setheading (40)      ,圆(-150,,69)   ,fillcolor (“# FBD624")   ,#将海龟移动到指定的坐标   ,   ,penup ()   ,转到(53.14,113.29)   ,pendown ()   ,   ,setheading (300)   ,圆(-150,30)   ,setheading (295)   ,圆(-140,20)   ,打印(位置())   ,(5)转发   ,setheading (260)   ,圆(-80,,70)   ,打印(位置())   ,penup ()   ,转到(-74.43,-79.09)   ,pendown ()         ,penup ()   ,#将海龟移动到指定的坐标   ,转到(-144103)   ,pendown ()   ,setheading (242)   ,圆(110,35)   ,对吧(10)   向前,(10)   ,setheading (250)   ,圆(80,,115)   ,打印(位置())      ,penup ()   ,转到(-74.43,-79.09)   ,pendown ()   ,setheading (10)   ,penup ()   ,转到(-144,,103)      ,pendown ()   ,penup ()   ,转到(x, y)   ,pendown ()         ,end_fill ()      ,#下巴   ,penup ()   ,转到(-50,-82.09)   ,pendown ()   ,pencolor (“# DDA120")   ,fillcolor (“# DDA120")   ,begin_fill ()   ,setheading (-12)   ,圆(120,25)   ,setheading (-145)   ,向前(30)   ,setheading (180)   ,圆(-20,20)   ,setheading (143)   ,向前(30)   ,end_fill ()   ,# penup ()   ,# #,将海龟移动到指定的坐标   ,# goto (0, 0)   ,# pendown ()      def 眼():   ,“““画眼睛“““   ,#左眼   ,颜色(“black",“black")   ,penup ()   ,转到(-110,27)   ,pendown ()   ,begin_fill ()   ,setheading (0)   ,圆(24)   ,end_fill ()   ,#左眼仁   ,颜色(“white",,“white")   ,penup ()   ,转到(-105,51)   ,pendown ()   ,begin_fill ()   ,setheading (0)   ,圆(10)   ,end_fill ()   ,#右眼   ,颜色(“black",,“black")   ,penup ()   ,转到(25岁,40)   ,pendown ()   ,begin_fill ()   ,setheading (0)   ,圆(24)   ,end_fill ()   ,#右眼仁   ,颜色(“white",,“white")   ,penup ()   ,转到(17,62)   ,pendown ()   ,begin_fill ()   ,setheading (0)   ,圆(10)   ,end_fill ()   def 脸颊():   ,“““画脸颊“““   ,#右边   ,颜色(“# 9 e4406",,“# FE2C21")   ,penup ()   ,转到(-130,,-50)   ,pendown ()   ,begin_fill ()   ,setheading (0)   ,圆(27)   ,end_fill ()      ,#左边   ,颜色(“# 9 e4406",,“# FE2C21")   ,penup ()   ,转到(53,-20)   ,pendown ()   ,begin_fill ()   ,setheading (0)   ,圆(27)   ,end_fill ()         def 鼻子():   ,“““画鼻子“““   ,颜色(“black",,“black")   ,penup ()   ,转到(-40,38)   ,pendown ()   ,begin_fill ()   ,圆(=7,steps  3)   ,end_fill ()   def 口():   ,“““画嘴“““   ,颜色(“black",,“# F35590")   ,#嘴唇   ,penup ()   ,转到(-10,22)   ,pendown ()   ,begin_fill ()   ,setheading (260)   ,向前(60)   ,圆(-11,,150)   ,转发(55)   ,打印(位置())   ,penup ()   ,转到(-38.46,21.97)   ,pendown ()   ,end_fill ()      ,#舌头   ,颜色(“# 6 a070d",,, # 6 a070d")   ,begin_fill ()   ,penup ()   ,转到(-10.00,22.00)   ,pendown ()   ,penup ()   ,转到(-14.29,-1.7)   ,pendown ()   ,penup ()   ,转到(-52,5)   ,pendown ()   ,penup ()   ,转到(-60.40,12.74)   ,pendown ()   ,penup ()   ,转到(-38.46,21.97)   ,pendown ()   ,penup ()   ,转到(-10.00,22.00)   ,pendown ()      ,end_fill ()      ,颜色(“black",“# FFD624")      ,penup ()   ,转到(-78,15)   ,pendown ()   ,begin_fill ()   ,setheading (-25)   范围,for 小姐:拷贝(2):   setheading才能(-25)   圆才能(35岁,70)      ,end_fill ()   ,颜色(“# AB1945",,“# AB1945")   ,penup ()   ,转到(-52,5)   ,pendown ()   ,begin_fill ()   ,setheading (40)   ,圆(-33,,70)   -1.7,转到(-16)   ,penup ()   ,转到(-18、-17)   ,pendown ()   ,setheading (155)   ,圆(25,70)   ,end_fill ()         def 耳朵():   ,“““画耳朵“““   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null

如何使用python画一只可爱的皮卡丘