实例1: 温度转换???????????????????????????????????????????????????????????????????????????????? 描述 这是"实例"题,不需要作答。??????????????????????????????????????????? ...
分类:
编程语言 时间:
2018-10-24 15:30:23
阅读次数:
183
""" 功能:五角星绘制,加入循环 """ import turtle def draw_pentagrm(size): count = 1 # 五角星绘制 while count <= 5: turtle.forward(size) turtle.right(144) count += 1 def... ...
分类:
其他好文 时间:
2018-10-20 22:13:45
阅读次数:
152
递归函数定义中调用函数自身的方式称为递归能够非常简洁地解决重要问题每次函数调用时,函数参数会临时存储,相互没有影响达到终止条件时,各函数逐层结束运算,返回计算结果要注意终止条件的构建,否则递归无法正常返回结果 """ 功能:五角星绘制,加入循环,使用迭代 """ import turtle def ...
分类:
其他好文 时间:
2018-10-20 22:08:27
阅读次数:
147
Turtle的运动方法: turtle.forward(d): 命令箭头移动d像素 turtle.backward(d): 命令箭头向指向的反方向移动d像素,箭头的指向不变 turtle.goto(x, y): 将箭头移动到一个坐标 turtle.home(): 将箭头移动到起点(0,0)和向东 t ...
分类:
编程语言 时间:
2018-10-20 11:02:30
阅读次数:
296
import turtle #引用turtle库 turtle.setup(650,350,200,200) #画布空间 turtle.setup(width.heigh,starx.stary) turtle.penup() #抬起画笔 turtle.fd(-250) #向正前方向运动 turtl... ...
分类:
编程语言 时间:
2018-10-16 13:47:02
阅读次数:
314
FUNCTIONS Screen() Return the singleton screen object. If none exists at the moment, create a new one and return it, else return the existing one. add ...
分类:
编程语言 时间:
2018-10-13 02:51:46
阅读次数:
738
10分钟轻松学会 Python turtle 绘图 python2.6版本中后引入的一个简单的绘图工具,叫做海龟绘图(Turtle Graphics),turtle库是python的内部库,使用导入即可 import turtle 先说明一下turtle绘图的基础知识: 1. 画布(canvas) ...
分类:
其他好文 时间:
2018-10-10 00:58:03
阅读次数:
3344
```py
from turtle import *
import time setup(600, 800, 0, 0)
speed(0)
penup()
seth(90)
fd(340)
seth(0)
pendown() speed(5)
begin_fill()
fillcolor('red'... ...
分类:
其他好文 时间:
2018-08-23 13:05:35
阅读次数:
133
题目1.1 :显示"welcome to python " 答案:print('welcome to python') 题目1.2:显示"welcome to python " 五次 答案:print ("welcome to python\n") * 5 #\n表示换行,要是没有\n的话就会连接在 ...
分类:
编程语言 时间:
2018-08-22 21:58:49
阅读次数:
698
又是一个看起来神奇无比的东东,证明是不可能证明的,这辈子不可能看懂的,知道怎么用就行了,具体看wikihttps://en.wikipedia.org/wiki/Lindstr%C3%B6m%E2%80%93Gessel%E2%80%93Viennot_lemma LGV定理就是求n个起点到n个终点 ...
分类:
其他好文 时间:
2018-08-11 17:45:08
阅读次数:
460