blob: 80774859de0d6dc18eab25659a6be48acda16983 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
from turtle import *
hideturtle()
width(6)
pensize = 10
pu()
goto(0,-400)
def rectangle(x, y, _label):
pu()
seth(0)
backward(x / 2)
fontsize = 40
pd()
for i in range(2):
forward(x)
left(90)
forward(y)
left(90)
pu()
forward(x / 2)
left(90)
forward(y / 2 - fontsize)
pd()
write(_label, align='center', font=('Arial', fontsize, 'bold'))
rectangle(800, 80, 'cmd')
pu()
forward(80)
rectangle(200, 400, 'cmd2')
while True:
pass
|