• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python turtle.lt函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中turtle.lt函数的典型用法代码示例。如果您正苦于以下问题:Python lt函数的具体用法?Python lt怎么用?Python lt使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了lt函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: ustDoNastKraw

def ustDoNastKraw(ile, bokKw=10):
    turtle.pu()
    turtle.lt(90)
    turtle.fd(bokKw)
    turtle.rt(90)
    turtle.rt(180)
    turtle.pd()
开发者ID:ujanlabs,项目名称:miniLogia_Py,代码行数:7,代码来源:Zadanie_2.py


示例2: ustDoNastTetki

def ustDoNastTetki(orient=1, bokKw=10):
    turtle.pu()
    turtle.rt(90*orient)
    turtle.fd(bokKw*2)
    turtle.lt(90*orient)
    turtle.fd(bokKw*3)
    turtle.pd()
开发者ID:ujanlabs,项目名称:miniLogia_Py,代码行数:7,代码来源:Zadanie_2.py


示例3: kwiatek

def kwiatek():
    p = 0
    while (p <= 7):
        platek()
        turtle.bk(50)
        turtle.lt(360/8)
        p = p + 1
开发者ID:ujanlabs,项目名称:miniLogia_Py,代码行数:7,代码来源:Zadanie_2.py


示例4: szach

def szach(n):
    ustNaStart()
    numPowX = 1
    numPowY = 1
    bok = floor(450 / n)
    while(numPowY <= n / 2):
        while(numPowX <= n / 2):
            parzDwaKwadraty(bok)
            numPowX = numPowX + 1
        korDuza(n)
        turtle.pu()
        turtle.lt(90)
        turtle.fd(bok)
        turtle.rt(90)
        turtle.pd()
        numPowX = 1
        while(numPowX <= n / 2):
            nieParzDwaKwadraty(bok)
            numPowX = numPowX + 1
        korDuza(n)
        turtle.pu()
        turtle.lt(90)
        turtle.fd(bok)
        turtle.rt(90)
        turtle.pd()
        numPowX = 1
        numPowY = numPowY + 1
开发者ID:ujanlabs,项目名称:miniLogia_Py,代码行数:27,代码来源:Zadanie_1.py


示例5: circle

def circle (r, cl, lt, p, t):
	t.goto(0, 0)
	t.color(cl)
	t.pensize(1)
	for i in range (0, 360):
		t.fd(2.0*math.sin(math.pi/360)*r)
		turtle.lt(1)
开发者ID:JCGitHubJC,项目名称:CM4K,代码行数:7,代码来源:circle.py


示例6: makeshape

def makeshape():
	B = 25				# base unit size
	turtle.begin_poly()
	turtle.fd(B)			# roof
	turtle.rt(45)
	turtle.fd(B * 3/4)		# windshield
	turtle.lt(45)
	turtle.fd(B)			# hood
	turtle.rt(90)
	turtle.fd(B * 3/4)		# front
	turtle.rt(90)
	turtle.fd(B * 1/7)
	turtle.lt(90)
	turtle.circle(-B/2, 180)	# front tire
	turtle.lt(90)
	turtle.fd(B)
	turtle.lt(90)
	turtle.circle(-B/2, 180)	# back tire
	turtle.lt(90)
	turtle.fd(B * 1/7)
	turtle.rt(90)
	turtle.fd(B * 5/6)		# back
	turtle.end_poly()
	poly = turtle.get_poly()
	turtle.register_shape('car', poly)
开发者ID:sbihel,项目名称:retrogames,代码行数:25,代码来源:eg-poly.py


示例7: kwadrat

def kwadrat(bok):
    numPow = 1
    while(numPow <= 4):
        turtle.fd(bok)
        turtle.lt(90)
        numPow = numPow + 1
    korMala(bok)
开发者ID:ujanlabs,项目名称:miniLogia_Py,代码行数:7,代码来源:Zadanie_1.py


示例8: ustDoElki

def ustDoElki(dlBokKw, bokKr):
    turtle.pu()
    turtle.fd(bokKr - dlBokKw)
    turtle.lt(90)
    turtle.fd(dlBokKw)
    turtle.lt(90)
    turtle.pd()
开发者ID:ujanlabs,项目名称:miniLogia_Py,代码行数:7,代码来源:Zadanie_4.py


示例9: wiatrak

def wiatrak(wysokosc):
    turtle.lt(90)
    turtle.fd(wysokosc*26)
    trapez(pomaranczowy)
    turtle.pu()
    turtle.fd(26)
    turtle.rt(90)
    turtle.fd(26)
    turtle.rt(180)
    turtle.pd()
    trapez(zielony)
    turtle.pu()
    turtle.fd(26)
    turtle.rt(90)
    turtle.fd(26)
    turtle.rt(180)
    turtle.pd()
    trapez(pomaranczowy)
    turtle.pu()
    turtle.fd(26)
    turtle.rt(90)
    turtle.fd(26)
    turtle.lt(180)
    turtle.pd()
    trapez(zielony)
    turtle.pu()
    turtle.fd(26)
    turtle.rt(90)
    turtle.fd(26*(wysokosc+1))
    turtle.pd()
开发者ID:ujanlabs,项目名称:miniLogia_Py,代码行数:30,代码来源:Zadanie_2.py


示例10: ustDoKwadratu

def ustDoKwadratu(dlBokKw):
    turtle.pu()
    turtle.fd(dlBokKw * 2)
    turtle.lt(90)
    turtle.fd(dlBokKw * 2)
    turtle.lt(90)
    turtle.pd()
开发者ID:ujanlabs,项目名称:miniLogia_Py,代码行数:7,代码来源:Zadanie_4.py


示例11: ustNaStartKwiatki

def ustNaStartKwiatki(rozmKanwy, segment):
    turtle.pu()
    turtle.bk(225)
    turtle.lt(90)
    turtle.bk(225)
    turtle.rt(90)
    turtle.pd()
开发者ID:ujanlabs,项目名称:miniLogia_Py,代码行数:7,代码来源:Zadanie_4.py


示例12: plansza

def plansza(bok):
    bokMalKw = bok/7
    rDuzKol = bokMalKw
    rMalKol = bokMalKw/2
    numPowPlus = 1
    numPowKola = 1
    ustNaStart(bok)
    turtle.pu() ##W figurach nie ma krawędzi
    duzyKwadrat(bok)
    ustDoPlusa(bokMalKw)
    while numPowPlus <= 4:
        plus(bokMalKw, rMalKol)
        turtle.rt(90)
        turtle.fd(bokMalKw)
        numPowPlus = numPowPlus + 1
    ustDoKol(bokMalKw)
    turtle.fillcolor(250, 250, 0)
    while numPowKola <= 4:
        turtle.rt(90)
        turtle.fd(bokMalKw)
        turtle.lt(180)
        turtle.begin_fill()
        turtle.circle(rDuzKol)
        turtle.end_fill()
        turtle.lt(180)
        turtle.fd(bokMalKw * 6)
        numPowKola = numPowKola + 1
    turtle.pd()
开发者ID:ujanlabs,项目名称:miniLogia_Py,代码行数:28,代码来源:Zadanie_1.py


示例13: rogi

def rogi(bok):
    gamma = 90 + 18
    beta = 360 / 5
    alpha = 180 - beta
    romb(bok)
    naGoreRombu(bok)
    turtle.lt(gamma)
    romb(bok)
    naGoreRombu(bok)
    turtle.rt(gamma)
    romb(bok)
    turtle.pu()
    turtle.rt(gamma)
    turtle.fd(bok)
    turtle.lt(beta)
    turtle.fd(60)
    turtle.rt(beta)
    turtle.pd()
    romb(bok)
    naGoreRombu(bok)
    turtle.lt(alpha)
    romb(bok)
    turtle.lt(beta)
    naGoreRombu(bok)
    turtle.lt(beta*1.5)
    naGoreRombu(bok)
    turtle.rt(180)
开发者ID:ujanlabs,项目名称:miniLogia_Py,代码行数:27,代码来源:Zadanie_2.py


示例14: ustNaStart

def ustNaStart(dlBokKw, ile):
    turtle.pu()
    turtle.bk(dlBokKw * ile / 2 +5)
    turtle.lt(90)
    turtle.fd(dlBokKw * (ile - 2) / 2 - 5)
    turtle.rt(90)
    turtle.pd()
开发者ID:ujanlabs,项目名称:miniLogia_Py,代码行数:7,代码来源:Zadanie_3.py


示例15: okoP

def okoP(a):
    turtle.begin_fill()
    wielokat(6, a *4, 4)
    turtle.end_fill()
    turtle.rt(180)
    turtle.fd(a * 4)
    turtle.lt(360 / 6)
    turtle.fd(a * 4)
    turtle.lt(360 / 6)
    turtle.fd(a * 4)
    turtle.colormode(255)
    turtle.fillcolor(255, 255, 255)
    turtle.rt(180)
    turtle.fd(a)
    turtle.rt(120)
    turtle.begin_fill()
    wielokat(6, 2 * a, 4)
    turtle.end_fill()
    turtle.rt(60)
    turtle.fd(a / 2)
    turtle.rt(120)
    turtle.fillcolor(0, 0, 0)
    turtle.begin_fill()
    wielokat(6, a, 4)
    turtle.end_fill()
开发者ID:ujanlabs,项目名称:miniLogia_Py,代码行数:25,代码来源:Zadanie_1.py


示例16: ustNaStart

def ustNaStart(r):
    turtle.lt(90)
    turtle.pu()
    turtle.rt(90)
    turtle.fd(r)
    turtle.lt(90)
    turtle.pd()
开发者ID:ujanlabs,项目名称:miniLogia_Py,代码行数:7,代码来源:Zadanie_2.py


示例17: korDuza

def korDuza(popr,ile):
    turtle.pu()
    turtle.bk(popr * ile)
    turtle.lt(90)
    turtle.bk(popr)
    turtle.rt(90)
    turtle.pd()
开发者ID:ujanlabs,项目名称:miniLogia_Py,代码行数:7,代码来源:Zadanie_3.py


示例18: ustNaStart

def ustNaStart(a):
    turtle.pu()
    turtle.bk(a)
    turtle.lt(90)
    turtle.fd(a / 2)
    turtle.rt(90)
    turtle.pd()
开发者ID:ujanlabs,项目名称:miniLogia_Py,代码行数:7,代码来源:Zadanie_1.py


示例19: draw_l

def draw_l(word):
    turtle.up()
    turtle.clear()
    turtle.setposition(0, 0)
    turtle.setheading(0)
    turtle.bk(INITIAL_POS[0])
    turtle.down()
    turtle.st()
    stack = []
    for char in word:
        if char == '0':
            turtle.fd(SIZE[0])
        if char == '1':
            turtle.fd(SIZE[0])
        if char == '[':
            stack.append((turtle.position(), turtle.heading()))
            turtle.lt(45)
        if char == ']':
            position, heading = stack.pop()
            turtle.up()
            turtle.setposition(position)
            turtle.setheading(heading)
            turtle.rt(45)
            turtle.down()
    turtle.ht()
开发者ID:RichardBarrell,项目名称:snippets,代码行数:25,代码来源:draw_l.py


示例20: turtleXYZ

def turtleXYZ():
	turtle.goto(0, 0)
	turtle.pd()
	turtle.goto(0, 300)
	turtle.goto(6, 290)
	turtle.pu()
	turtle.goto(-6, 290)
	turtle.pd()
	turtle.goto(0, 300)
	turtle.goto(0, 0)
	turtle.goto(300, 0)
	turtle.goto(290, 6)
	turtle.pu()
	turtle.goto(290, -6)
	turtle.pd()
	turtle.goto(300, 0)
	turtle.goto(0, 0)
	turtle.rt(135)
	turtle.fd(212.1)
	turtle.lt(135)
	turtle.fd(5)
	turtle.bk(10)
	turtle.lt(90)
	turtle.fd(10)
	turtle.pu()
	turtle.goto(0, 0)
开发者ID:Yexiaoxing,项目名称:myPythonCode,代码行数:26,代码来源:CalculateDistence.py



注:本文中的turtle.lt函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python turtle.mainloop函数代码示例发布时间:2022-05-27
下一篇:
Python turtle.listen函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap