当前位置: 首页>>代码示例>>Python>>正文


Python turtle.pu函数代码示例

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


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

示例1: ustNaStart

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

示例2: 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

示例3: 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

示例4: circle

def circle(a,b):
    turtle.color("green")
    turtle.pu()
    turtle.goto(a,b)
    turtle.pd()
    turtle.setheading(90)
    turtle.circle(40)
开发者ID:DCoelhoM,项目名称:Tic-Tac-Toe-Python,代码行数:7,代码来源:Tic-Tac-Toe_by_DCM.py

示例5: draw_circle

def draw_circle(x,y,r,t):
    t.pu()
    t.goto(x+r,y)
    t.setheading(90)
    t.pd()
    t.circle(r)
    t.pu()
开发者ID:wraith1995,项目名称:persistentHomology,代码行数:7,代码来源:ph.py

示例6: rowOfShapes

def rowOfShapes(number):
    for x in xrange(number):
        hexaTrangle(25,90,randomColor(),randomColor())
        turtle.left(90)
        turtle.pu()
        turtle.fd(15)
        turtle.pd()
开发者ID:KrbAlmryde,项目名称:Homework,代码行数:7,代码来源:ISTA130_HW2c.py

示例7: ustDoNosa

def ustDoNosa(a):
    turtle.pu()
    turtle.rt(60)
    turtle.bk(1.5 * a)
    turtle.fd(4 * a)
    turtle.lt(360 / 6)
    turtle.fd(4 * a)
    turtle.lt(360 / 6)
    turtle.fd(4 * a)
    turtle.lt(360 / 6)
    turtle.rt(180)
    turtle.lt(60)
    turtle.fd(a * 4)
    turtle.lt(120)
    turtle.fd(a * 8)
    turtle.lt(360 / 12)
    turtle.fd(a * 8)
    turtle.lt(360 / 12)
    turtle.fd(a * 8)
    turtle.lt(360 / 12)
    turtle.fd(a * 8)
    turtle.lt(360 / 12)
    turtle.lt(60)
    turtle.fd(8 * a)
    turtle.lt(30)
    turtle.lt(360 / 6)
    turtle.fd(2 * a)
    turtle.rt(360 / 6)
    turtle.fd(2 * a)
    turtle.rt(360/ 6)
    turtle.fd(a * 2)
    turtle.lt(360 / 6)
    turtle.pd()
开发者ID:ujanlabs,项目名称:miniLogia_Py,代码行数:33,代码来源:Zadanie_1.py

示例8: 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

示例9: 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

示例10: draw_triangle

def draw_triangle(x,y):
	turtle.pu()
	turtle.goto(x,y)
	turtle.pd()
	turtle.goto(x+60,y+85)
	turtle.goto(x+85,y)
	turtle.goto(x,y)
开发者ID:talam16-meet,项目名称:MEET-YL1,代码行数:7,代码来源:meetconf.py

示例11: 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

示例12: 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

示例13: 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

示例14: 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

示例15: draw

def draw():
	size = randint(40, 300)
	angles = (144, 150, 157.5, 160, 165)
	angle = sample(angles, 1)[0]
	
	colors = [
		('#922B21', '#E6B0AA'), ('#76448A', '#D2B4DE'), ('#1F618D', '#AED6F1'), ('#515A5A', '#EAEDED'),
		('#148F77', '#D1F2EB'), ('#B7950B', '#F7DC6F'), ('#F39C12', '#FDEBD0'), ('#BA4A00', '#F6DDCC')]
	color = sample(colors, 1)[0]
	tt.color(color[0], color[1])
	
	x_pos = randint(-200,200)
	y_pos = randint(-200,200)
	tt.pu()
	tt.setpos(x_pos, y_pos)
	start_position = tt.pos()
	tt.pd()
	
	tt.begin_fill()
	while True:
		tt.forward(size)
		tt.left(angle)
		if abs(tt.pos() - start_position) < 1:
			break
	tt.end_fill()
开发者ID:car54giam,项目名称:Python,代码行数:25,代码来源:turtle_graphics.py


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