- 例1:hello world
print (”hello world”) - 例2:調用海龜畫圖庫
(1) 畫正方形
代碼:
import turtle as t
t.forward(100)
t.left(90)
t.forward(100)
t.left(90)
t.forward(100)
t.left(90)
t.forward(100)
t.left(90)
(2)畫圓
代碼:
import turtle as t
t.circle(100)