You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

hello.py 758B

3 months ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. from turtle import *
  2. def space():
  3. penup()
  4. forward(30)
  5. pendown()
  6. def draw_h():
  7. left(90)
  8. forward(100)
  9. backward(50)
  10. right(90)
  11. forward(50)
  12. left(90)
  13. forward(50)
  14. backward(100)
  15. right(90)
  16. def draw_e():
  17. left(90)
  18. forward(100)
  19. right(90)
  20. forward(50)
  21. backward(50)
  22. right(90)
  23. forward(50)
  24. left(90)
  25. forward(30)
  26. backward(30)
  27. right(90)
  28. forward(50)
  29. left(90)
  30. forward(50)
  31. def draw_l():
  32. left(90)
  33. forward(100)
  34. backward(100)
  35. right(90)
  36. forward(50)
  37. def draw_o():
  38. penup()
  39. forward(40)
  40. pendown()
  41. circle(50)
  42. penup()
  43. forward(40)
  44. pendown()
  45. speed(0)
  46. draw_h()
  47. space()
  48. draw_e()
  49. space()
  50. draw_l()
  51. space()
  52. draw_l()
  53. space()
  54. draw_o()
  55. done()