Posted By


a7xrturo on 10/01/13

Tagged


Statistics


Viewed 1391 times
Favorited by 0 user(s)

Pentagono Turtle


/ Published in: Python
Save to your folder(s)

Hacer un pentágono con Turtle


Copy this code and paste it in your HTML
  1. import turtle
  2.  
  3. print('Dibujar un pentágono!')
  4. largo = input('De que largo quieres que sea un lado del pentágono? ')
  5. largo = int(largo)
  6. turtle.forward (largo)
  7. turtle.right(60)
  8. turtle.forward(largo)
  9. turtle.right(60)
  10. turtle.forward(largo)
  11. turtle.right (60)
  12. turtle.forward(largo)
  13. turtle.right(60)
  14. turtle.forward(largo)
  15. turtle.right(60)
  16. turtle.forward(largo)
  17. input('Da enter para terminar el programa')

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.