Advertisement
Juan101

estrella

Dec 15th, 2019
536
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.54 KB | None | 0 0
  1. from turtle import *
  2. #importar la biblioteca turtle para dibujar
  3. dibujo = Turtle()        #mi turtle se llamara dibujo
  4.  
  5. def estrella():             #aqui empiza mi funcion estrrella
  6.     for i in range(5):       #ciclo for para cinco lados de la estrrella
  7.         dibujo.forward(150)  #recorrera mi dibujo 100 pixeles
  8.         dibujo.right(144)      #como la estrella tiene 5 lados hay 144 grados de separacion entre cada lado adyacente
  9.        
  10. estrella()                  #mandamos llamar a nuesra funcion para que empieze el dibujo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement