資源簡介
這是一個用python編寫的紅旗的代碼,用的是海龜畫圖模塊。
代碼片段和文件信息
#!/usr/bin/python
#?-*-?coding:?UTF-8?-*-
import?turtle
turtle.screensize(960?600?“red“)
turtle.speed(20)
turtle.fillcolor(“yellow“)
turtle.color(“yellow“)
turtle.right(30)
for?j?in?range(4):
????turtle.begin_fill()
????for?i?in?range(5):
????????turtle.forward(50)
????????turtle.right(144)
????turtle.end_fill()
????turt
評論
共有 條評論