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 | # # µû¶óÇÏ¸ç ¹è¿ì´Â ÆÄÀ̽ã°ú µ¥ÀÌÅÍ°úÇÐ(»ý´ÉÃâÆÇ»ç 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() | cs |