参考範例:畫一道光芒
import turtle as t
def drawCircle(step, diameter):
color = "green"
t.speed(0) #最快速
t.setup(width = 500, height = 300) #500 * 300視窗
t.hideturtle() #隱藏游标
t.up() #抬筆
t.fd(step) #往前step格
t.down() #落筆
t.dot(diameter, color) #畫园
t.up()
diameter = 15 #园半徑
step = 30 #园間距
for i in range(1, 6): #畫5個园
drawCircle(step, diameter) #呼叫畫园函式
題目要求:畫10道光芒(每道5個园),60%
加分題:畫20道紅色光芒,20%
學習單:10%
Q:1园360度,共10道光芒,第1道光芒要転幾度?第2道光芒要転幾度?,10%