码迷,mamicode.com
首页 >  
搜索关键字:turtle    ( 708个结果
python语言程序设计(1,2周)
实例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
python-函数和代码复用—七段数码管绘制和爱心
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
Python基本图形绘制——蟒蛇绘制
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
python标准库《turtle》
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
海龟绘图(Turtle Graphics)
10分钟轻松学会 Python turtle 绘图 python2.6版本中后引入的一个简单的绘图工具,叫做海龟绘图(Turtle Graphics),turtle库是python的内部库,使用导入即可 import turtle 先说明一下turtle绘图的基础知识: 1. 画布(canvas) ...
分类:其他好文   时间:2018-10-10 00:58:03    阅读次数:3344
flower.phw
```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
《python语言设计程序设计》_第一章编程题
题目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
LGV定理相关
又是一个看起来神奇无比的东东,证明是不可能证明的,这辈子不可能看懂的,知道怎么用就行了,具体看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
708条   上一页 1 ... 28 29 30 31 32 ... 71 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!