其他分享
首页 > 其他分享> > turtle库使用,奸笑脸低配版

turtle库使用,奸笑脸低配版

作者:互联网

import turtle as t

t.speed(10)
t.pensize(1)
t.hideturtle()
t.screensize(500, 500, bg='white')

t.color('yellow')
t.fillcolor('yellow')
t.begin_fill()
t.circle(120)
t.end_fill()

t.pu()
t.goto(-105, 160)
t.pensize(20)
t.pd()
t.color('white')
t.seth(40)
t.circle(-90, 60)
t.begin_fill()

t.pu()
t.goto(12, 160)
t.pensize(20)
t.pd()
t.color('white')
t.seth(40)
t.circle(-90, 60)
t.begin_fill()


t.pu()
t.goto(-104, 158)
t.pensize(18)
t.pd()
t.color('black')
t.circle(2)
t.begin_fill()

t.pu()
t.goto(13, 159)
t.pensize(18)
t.pd()
t.color('black')
t.circle(2)
t.begin_fill()

t.pu()
t.goto(-95, 90)
t.pensize(3)
t.pd()
t.color('red')
t.right(60)
t.circle(100, 160)
t.begin_fill()

t.done()

 

生成.exe

 

C:\Python37\Scripts>pyinstaller.exe -F D:\pytest\SongTian\2.3xixi.py
10984 INFO: Appending archive to EXE C:\Python37\Scripts\dist\2.3xixi.exe
11002 INFO: Building EXE from EXE-00.toc completed successfully.

标签:turtle,pensize,begin,低配,pu,color,笑脸,circle,fill
来源: https://www.cnblogs.com/p36606jp/p/15113904.html