@EdgarArcia/

Turtle 1-1

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
# The following code creates a square of different colors
#

import turtle

t = turtle.Turtle()
t.speed(100)

for c in ['red', 'green', 'yellow', 'blue']:
    t.color(c)
    t.forward(75)
    t.left(90)
t.penup()
t.goto(-25,-25)
t.pendown()
for c in ['red', 'green', 'yellow', 'blue']:
    t.color(c)
    t.forward(125)
    t.left(90)


#
# Write a program that creates 10 squares of different colors, each one 
# inside of the others, alternating the color of the sides
#
result
console