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.

germany.py 525B

3 months ago
12345678910111213141516171819202122232425262728293031323334
  1. from turtle import *
  2. def draw_rectangle(width, height):
  3. begin_fill()
  4. forward(width)
  5. right(90)
  6. forward(height)
  7. right(90)
  8. forward(width)
  9. right(90)
  10. forward(height)
  11. right(90)
  12. end_fill()
  13. def next_shape():
  14. penup()
  15. right(90)
  16. forward(50)
  17. left(90)
  18. pendown()
  19. pencolor('Black')
  20. fillcolor('Black')
  21. draw_rectangle(200, 50)
  22. next_shape()
  23. pencolor('Red')
  24. fillcolor('Red')
  25. draw_rectangle(200,50)
  26. next_shape()
  27. pencolor('Yellow')
  28. fillcolor('Yellow')
  29. draw_rectangle(200,50)
  30. done()