100行python语言简单画一个皮卡丘
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了100行python语言简单画一个皮卡丘,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1689字,纯文字阅读大概需要3分钟。
内容图文
![100行python语言简单画一个皮卡丘](/upload/InfoBanner/zyjiaocheng/1144/cb5bce82c55b489a8658712d156271a3.jpg)
效果图请拉到底!
1 import turtle as t 2 3 4 def nose(): 5 t.penup() 6 t.seth(90) 7 t.fd(100) 8 t.pendown() 9 t.begin_fill() 10 t.fillcolor(‘black‘) 11 t.seth(45) 12 t.fd(25) 13 t.seth(135) 14 t.circle(25, 90) 15 t.seth(315) 16 t.fd(25) 17 t.end_fill() 18 19 20def eyes(seth, fd, c): 21 t.penup() 22 t.seth(seth) 23 t.fd(fd) 24 t.pendown() 25 t.begin_fill() 26 t.fillcolor(‘black‘) 27 t.circle(50) 28 t.end_fill() 29 30 t.penup() 31 t.circle(50, c) 32 t.pendown() 33 t.begin_fill() 34 t.fillcolor(‘white‘) 35 t.circle(20) 36 t.end_fill() 37 38 39def face(seth, fd): 40 t.penup() 41 t.seth(seth) 42 t.fd(fd) 43 t.pendown() 44 t.begin_fill() 45 t.fillcolor(‘red‘) 46 t.circle(70) 47 t.end_fill() 48 49 50def lip(): 51 t.penup() 52 t.seth(135) 53 t.fd(250) 54 t.pendown() 55 t.seth(-300) 56 t.circle(30, -65) 57 t.begin_fill() 58 t.fillcolor(‘Firebrick‘) 59 t.seth(165) 60 t.fd(140) 61 t.seth(195) 62 t.fd(140) 63 t.seth(-360) 64 t.circle(30, -65) 65 t.penup() 66 t.seth(-60) 67 t.circle(30, 65) 68 t.pendown() 69 t.seth(-70) 70 t.fd(240) 71 t.circle(55, 140) 72 t.seth(70) 73 t.fd(240) 74 t.end_fill() 75 t.seth(-110) 76 t.fd(80) 77 t.begin_fill() 78 t.fillcolor(‘Firebrick1‘) 79 t.seth(120) 80 t.circle(120, 123) 81 t.seth(-70) 82 t.fd(165) 83 t.circle(55, 140) 84 t.seth(72) 85 t.fd(165) 86 t.end_fill() 87 88 89def setting(): 90 t.pensize(4) 91 t.hideturtle() 92 t.setup(1000, 600) 93 t.speed(10) 94 t.screensize(bg=‘yellow‘) 95 96 97def main(): 98 setting() 99 nose() 100 eyes(160, 250, 60) 101 eyes(-9.5, 530, 230) 102 face(195, 600) 103 face(-11, 720) 104 lip() 105 t.done() 106107108if__name__ == ‘__main__‘: 109 main()
原文:https://www.cnblogs.com/liangxfng/p/11847697.html
内容总结
以上是互联网集市为您收集整理的100行python语言简单画一个皮卡丘全部内容,希望文章能够帮你解决100行python语言简单画一个皮卡丘所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。