Exemple #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)
Exemple #2
0
from turtle import *
import shapes

shapes.triangle()
shapes.square()
shapes.pentagon()
shapes.hexagon()
shapes.octagon()
shapes.star()
shapes.circleS()

mainloop()
shapes.eq_triangle(150)

up()
left(120)
forward(275)
down()

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)
Exemple #4
0
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()
Exemple #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)
Exemple #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)