怎样在python的turtle中输入文字_如何用Python的turtle库写出自己的名字?

from turtle import *

#turtle.write("你的名字", move=False, align="left", font=("Arial", 8, "normal"))

import binascii

KEYS = [0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01]

ht()

screensize()

Turtle().screen.delay(0) #输出无延时

Turtle().screen.colormode(255)#设置颜色为255格式

rect_list = [] * 16

for i in range(16):

rect_list.append([] * 16)

text = "你的名字"

def filled_rectangle(x:int,y:int,l:int, w:int, colorGray: int):#画出正方形

up()

goto(x,y)

pencolor((128-colorGray)//2,(128-colorGray)//2,(128-colorGray)//2)

fillcolor(((128-colorGray)//2,(128-colorGray)//2,(128-colorGray)//2))

down()

begin_fill()

for i in range(2):

right(90)

forward(l)

right(90)

forward(w)

end_fill()

def printBitMap(char:str,x:int,y:int,fontSize:int):

gb2312 = char

你可能感兴趣的:(怎样在python的turtle中输入文字_如何用Python的turtle库写出自己的名字?)