Draw a cross at the specified position and with the specified length.
(x: float, y: float, length: float)
| 16 | |
| 17 | |
| 18 | def draw_cross(x: float, y: float, length: float): |
| 19 | """ |
| 20 | Draw a cross at the specified position and with the specified length. |
| 21 | """ |
| 22 | turtle.up() |
| 23 | turtle.goto(x - length / 2, y - length / 6) |
| 24 | turtle.down() |
| 25 | turtle.seth(0) |
| 26 | turtle.begin_fill() |
| 27 | for _ in range(4): |
| 28 | turtle.fd(length / 3) |
| 29 | turtle.right(90) |
| 30 | turtle.fd(length / 3) |
| 31 | turtle.left(90) |
| 32 | turtle.fd(length / 3) |
| 33 | turtle.left(90) |
| 34 | turtle.end_fill() |
| 35 | |
| 36 | |
| 37 | def draw_fractal_recursive(x: float, y: float, length: float, depth: float): |
no test coverage detected