当前位置:首页 > Software > Python > 正文内容

Python关于turtle的函数名

Doraemon5年前 (2020-02-02)Python5270
turtle.forward(distance)                   向当前画笔方向移动distance像素长度
turtle.backward(distance)              向当前画笔相反方向移动distance像素长度
turtle.right(degree)                   顺时针移动degree°
turtle.left(degree)                    逆时针移动degree°
turtle.pendown()                   移动时绘制图形,缺省时也为绘制
turtle.penup()                    提起笔移动,不绘制图形,用于另起一个地方绘制
turtle.goto(x,y)                    将画笔移动到坐标为x,y的位置(画笔末提起时按直线移动并绘制)
turtle.hideturtle()                  隐藏画笔的turtle形状
turtle.showturtle()                                   显示画笔的turtle形状
turtle.write(s,[font])                               写文本,s为文本的内容,font是字体的参数


扫描二维码推送至手机访问。

版权声明:本文由我的FPGA发布,如需转载请注明出处。

本文链接:https://myfpga.cn/index.php/post/126.html

分享给朋友:

“Python关于turtle的函数名” 的相关文章

math库的使用

math库的使用

math库包括4个数学常数math.pi      圆周率math.e       自然对数math.inf     正无穷大,负无穷大为-math.infmath.nan     非浮点数标记math库常用函数math.cell(x)      向上取整,返回不小于x的最小整数math.facto...

anaconda打不开的解决方法

anaconda打不开的解决方法

报错内容Navigator Error An unexpected error occurred on Navigator start-up Report Please report this ...

Python自动清理错误图片,深度学习训练数据集准备

Python自动清理错误图片,深度学习训练数据集准备

使用python运行from PIL import Image from pathlib import Path import os   path = r'.'  ...

(原创)使用Python对任意网站图片进行爬取,仅用于学习

(原创)使用Python对任意网站图片进行爬取,仅用于学习

import os import time import argparse import requests import re import io from urllib.parse import ...