Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created July 29, 2020 23:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/f45d583cad0b5d212461aeca30bdb89e to your computer and use it in GitHub Desktop.
Save parzibyte/f45d583cad0b5d212461aeca30bdb89e to your computer and use it in GitHub Desktop.
from turtle import *
def cuadrado(longitud):
# Cuatro veces...
for i in range(4):
# Ir hacia adelante
forward(longitud)
# Y girar 90 grados
right(90)
def espiral():
for i in range(72):
# Dibujar un cuadrado de 100
cuadrado(100)
# Y girar 5 grados
right(5)
# Yo no quiero animaciones
speed(0)
# Dibujar un espiral
espiral()
# El input es para pausar el programa
input("Presiona Enter para salir...")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment