task 5-1
from turtle import * import math def move(x,y): penup() goto(x,y) pendown() def main(): x = 100*math.sqrt(2) pensize(2) move(-100,-100) begin_fill() forward(200) left(90) forward(200) left(90) forward(200) left(90) end_fill() move(0,-100) pencolor('red') fillcolor('red') begin_fill() left(135) forward(x) left(90) forward(x) left(90) forward(x) left(90) forward(x) left(90) end_fill() main()
标签:200,实验,forward,90,100,left,fill From: https://www.cnblogs.com/heqifan666/p/17458456.html