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

Python关于turtle的函数名

Doraemon6年前 (2020-02-02)Python6089
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://www.myfpga.cn/index.php/post/126.html

分享给朋友:

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

0.Python环境的搭建

0.Python环境的搭建

   请打开网页  https://www.python.org/downloads/windows/    Windows环境下的Python        这里我选择...

搜索字符串

搜索字符串

常用搜索字符串中子串的方法str.count(substring)      返回str中substring子串出现的无覆盖的次数str.find(s1)                    返回s1在这个字符串的最低下标,如果字符串中不存在s1,则返回-1str.rfind(s1)       ...

random库

random库

random()            生成一个[0.0,1.0)之间的随机小数randint(a,b)     生成一个[a,b]之间的整数uniform(a,b)     生成一个[a,b]之间的随机小数对random库的引用方法与math库一样,采用下面两种方式实现:import random...

列表实例

列表实例

随机生成100个小写字母存入一个列表中,统计26个字母的出现次数。import random def getRandomLetter():     code_a=ord('a')     code_z=ord('z')     x=random.randint(code_a,code_z)...

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

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

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