Python_Beginer/Turtle
Python - for 문을 활용하여 복잡한 원 그리기
AnKiWoong
2019. 3. 1. 16:58
반응형
< 복잡한 원 >
1. for문을 활용하여 복잡한 원 그리기
import turtle as t
n = 60
t.shape('turtle')
t.speed(10) #속도 : 'fastest': 0 / 'fast': 10 / 'normal': 6 / 'slow': 3 / 'slowest': 1
for i in range(n):
t.circle(120)
t.right(360 / n)
2. 실행 화면
반응형