#
# µû¶óÇÏ¸ç ¹è¿ì´Â ÆÄÀ̽ã°ú µ¥ÀÌÅÍ°úÇÐ(»ý´ÉÃâÆÇ»ç 2020)
# LAB 6-5 °ÅºÏÀÌ¿¡°Ô ¸·´ë ±×·¡ÇÁ¸¦ ±×¸®°Ô ÇÏÀÚ, 161ÂÊ
#
import turtle
def drawBar(height):
t.begin_fill()
t.left(90)
t.forward(height)
t.write(str(height), font = ('Times New Roman', 16, 'bold'))
t.right(90)
t.forward(40)
t.right(90)
t.forward(height)
t.left(90)
t.end_fill()
data = [120, 56, 309, 220, 156, 23, 98]
t = turtle.Turtle()
t.color("blue")
t.fillcolor("red")
t.pensize(3)
for d in data:
drawBar(d)
turtle.done()