コード例 #1
0
def test(size, color, fill='Default'):  # runs all shapes
    sh.triangle(size, color)
    #forward(300)
    sh.square(size, color)
    #forward(300)
    sh.pentagon(size, color)
    #forward(300)
    sh.hexagon(size, color)
    #forward(300)
    sh.octagon(size, color)
    #forward(300)
    sh.star(size, color)
    #forward(300)
    sh.circler(size, color)
コード例 #2
0
import shapes

shapes.octagon()
shapes.circlery()
shapes.square()
shapes.hexagon()
shapes.star()
shapes.triangle()

mainloop()
コード例 #3
0
shapes.square(125)

up()
left(90)
forward(275)
down()

shapes.pentagon(95)

up()
right(18)
forward(150)
right(90)
down()

shapes.hexagon(80)

up()
left(60)
forward(360)
down()

shapes.octagon(65)

up()
left(45)
forward(60)
left(90)
forward(250)
left(18)
down()
コード例 #4
0
ファイル: turtle_shapes.py プロジェクト: jwmarion/DC_Turtles
import shapes
from turtle import mainloop

shapes.startPoint()

shapes.star(100, True, 'red')

shapes.square(100, False, 'blue')

shapes.hexagon(100, True, 'beige')

shapes.circle(100, True, 'purple')

shapes.pentagon(100, False, 'white')

shapes.octagon(100, True, 'Green')

shapes.triangle(100, True, 'yellow')

mainloop()
コード例 #5
0
#!usr/bin/env python3

import shapes as s

# use all of shapes' functions to print everything ontop of each other
# all parameters have defaults
# paramater order size, "color", fill, wait
s.equilateral_triangle(200, "red", True)
s.square(200, "black")
s.pentagon(120, "purple", True)
s.hexagon(120)
s.octagon(color="blue")
s.star(300, "yellow")
s.circle(wait=True)
コード例 #6
0
#!usr/bin/env python3

import shapes as s

# use all of shapes' functions to print everything ontop of each other
s.equilateral_triangle()
s.square()
s.pentagon()
s.hexagon()
s.octagon()
s.star()
s.circle(wait=True)