ウィンドウを作成する関数があります:
import turtle
t=turtle.Pen()
def drawindow(dis):
t.down()
t.seth(0)
drawshape(4, 15)
t.up()
t.fd(7.5)
t.seth(90)
t.down()
t.fd(15)
t.up()
t.seth(180)
t.fd(7.5)
t.seth(270)
t.fd(7.5)
t.seth(0)
t.down()
t.fd(15)
t.end_fill()
ペンの色を黒にしたいのですが、塗りつぶしを別の色にしたいです。この関数を含む関数を定義しましたdrawhouse()
。この前に、ペンの色を黒に設定し、塗りつぶしを開始します。やってみt.begin_fill('blue')
ましたが、うまくいきません。助けてください。
drawshape(x, y)
辺が x で、各辺の長さが y である多角形を描画します。