repl.it
@AidanMundle/

relearning turtle

Python (with Turtle)

No description

fork
loading
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import turtle

Aidan=turtle.Turtle()

def square(s):
  for i in range(4):
    Aidan.forward(s)
    Aidan.left(90)

def row(s,n):
  for i in range(n):
    square(s)
    Aidan.forward(s)

def steps(s,n):
  Aidan.speed(0)
  for i in range(n):
    row(s,n) 
    Aidan.left(180)
    Aidan.forward(n*s)
    Aidan.right(90)
    Aidan.forward(s)
    Aidan.right(90)
    n=n-1



steps(4,15)
result
console
?