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

Python关于turtle的函数名

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

分享给朋友:

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

2.Python中的基本运算

2.Python中的基本运算

我们打开Python,请你尝试输入如下算式并尝试理解有什么为什么是这样的?1+1 1+1.0 1-2 2-3.5 1*1 1*1.1 1/2 2/1 2/3 3/2 3//2 3/1.0 5/2.5我们不难得到如下结果2 2.0 -1 -1.5 1 1.1 0.5...

顺序查找

顺序查找

如果需要查找某个特定值的位置(以便能够替换或删除它),可以直接使用index方法。searchedValue=100 #values是之前定义好的一个列表 if searchedValue in walues:     pos=values.index(searchedValue)     ...

列表作为函数参数

列表作为函数参数

列表作为函数参数,函数中可以修改原列表def multiply(values,factor):     for i in range(len(values)):        values[i]*=factor          aList=[1,2,3,4,5]  multiply(aL...

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

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

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

(原创)使用Python递归获取网页内的所有URL,并进行清洗

(原创)使用Python递归获取网页内的所有URL,并进行清洗

import argparse import time from urllib.parse import urljoin, urlparse from selenium import webdriver...

(原创)使用Python提取ISE工程的RTL代码

(原创)使用Python提取ISE工程的RTL代码

在工程文件夹下运行Python程序即可 #Author       : / #Description  : 从ISE的项目文件夹中提取rtl文件,用于LEDA调试 #Time ...