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 33 34 35 36 37 38 39 40 41 42 | # # µû¶óÇÏ¸ç ¹è¿ì´Â ÆÄÀ̽ã°ú µ¥ÀÌÅÍ°úÇÐ(»ý´ÉÃâÆÇ»ç 2020) # LAB 5-8 while ¹®À¸·Î º° ±×¸®±â¸¦ Çغ¸ÀÚ, 131ÂÊ # import turtle t = turtle.Turtle() t.shape("turtle") i = 0 while i < 5: # 5°³ÀÇ ¼±ºÐÀ» ±×¸®±â À§ÇÏ¿© 5ȸ ¹Ýº¹ t.forward(50) # 50 Çȼ¿ ±æÀÌÀÇ ¼±ºÐÀ» ±×¸°´Ù t.right(144) # 144µµ °ÅºÏÀ» ȸÀü½ÃŲ´Ù turtle.done() # # µû¶óÇÏ¸ç ¹è¿ì´Â ÆÄÀ̽ã°ú µ¥ÀÌÅÍ°úÇÐ(»ý´ÉÃâÆÇ»ç 2020) # LAB 5-8 while ¹®À¸·Î º° ±×¸®±â¸¦ Çغ¸ÀÚ, 131ÂÊ # import turtle t = turtle.Turtle() t.shape("turtle") i = 0 while i < 18: # °¡¿îµ¥ ±×¸²°ú °°À¸·Á¸é 18¹ø ¹Ýº¹ÇØ¾ß ÇÑ´Ù. t.forward(150) # 150 Çȼ¿ ±æÀÌÀÇ ¼±ºÐÀ» ±×¸°´Ù t.right(140) # 140µµ °ÅºÏÀ» ȸÀü½ÃŲ´Ù i = i + 1 # º¯¼ö i¸¦ 1¸¸Å Áõ°¡½ÃŲ´Ù turtle.done() # # µû¶óÇÏ¸ç ¹è¿ì´Â ÆÄÀ̽ã°ú µ¥ÀÌÅÍ°úÇÐ(»ý´ÉÃâÆÇ»ç 2020) # LAB 5-8 while ¹®À¸·Î º° ±×¸®±â¸¦ Çغ¸ÀÚ, 131ÂÊ # import turtle t = turtle.Turtle() t.shape("turtle") i = 0 while i < 5: # 5°³ÀÇ ¼±ºÐÀ» ±×¸®±â À§ÇÏ¿© 5ȸ ¹Ýº¹ t.forward(50) # 50 Çȼ¿ ±æÀÌÀÇ ¼±ºÐÀ» ±×¸°´Ù t.right(144) # 144µµ °ÅºÏÀ» ȸÀü½ÃŲ´Ù t.forward(50) # 50 Çȼ¿ ±æÀÌÀÇ ¼±ºÐÀ» ±×¸°´Ù t.left(72) i = i + 1 # º¯¼ö i¸¦ 1¸¸Å Áõ°¡½ÃŲ´Ù turtle.done() | cs |