Created
July 29, 2020 23:49
-
-
Save parzibyte/fbab248a3f8fd1f3d64fa46849b74e06 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from turtle import * | |
""" | |
Encerramos el comportamiento en una función. | |
""" | |
def cuadrado(longitud): | |
# Cuatro veces... | |
for i in range(4): | |
# Ir hacia adelante | |
forward(longitud) | |
# Y girar 90 grados | |
right(90) | |
# Yo no quiero animaciones | |
speed(0) | |
# Dibujar un cuadrado de 100 | |
cuadrado(100) | |
# 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