diff --git a/__pycache__/shapes.cpython-313.pyc b/__pycache__/shapes.cpython-313.pyc new file mode 100644 index 0000000..c562f6c Binary files /dev/null and b/__pycache__/shapes.cpython-313.pyc differ diff --git a/drawing.py b/drawing.py index 29fc89e..ad00854 100644 --- a/drawing.py +++ b/drawing.py @@ -5,3 +5,15 @@ # (Briefly describe what this program does.) from turtle import * +from shapes import board +from shapes import black_tile +from shapes import white_tile +from shapes import red_coin +from shapes import blue_coin + + + +blue_coin(10) + + +input() \ No newline at end of file diff --git a/shapes.py b/shapes.py new file mode 100644 index 0000000..106e6cf --- /dev/null +++ b/shapes.py @@ -0,0 +1,43 @@ +from turtle import * + +def board(side_length): + "Out line of the board" + sides = [side_length, side_length, side_length, side_length] + for sides in sides: + pensize(4) + forward(sides) + right(90) + + +def square(size): + "Draws a square of side length `size`" + for side in range(4): + forward(size) + left(90) + +def black_tile(size): + begin_fill() + fillcolor('black') + square(size) + end_fill() + + +def white_tile(size): + begin_fill() + fillcolor('white') + square(size) + end_fill() + + +def red_coin(size): + begin_fill() + fillcolor('red') + circle(size) + end_fill() + + +def blue_coin(size): + begin_fill() + fillcolor('blue') + circle(size) + end_fill() \ No newline at end of file