print(turtle.getshapes()) 输出: ['arrow', 'blank', 'circle', 'classic', 'square', 'triangle', 'turtle'] 范例2: Python3 # import packageimportturtle shapes = turtle.getshapes()# set speed to slowestturtle.speed(1)# draw all shapesforiinrange(len(shapes)):# shapeturtle.shape(shapes...
2 classTurtle:3 def __init__(self,x):4 self.num=x5 classFish:6 def __init__(self,x):7 self.num =x8 classPool:9 def __init__(self,x,y):10 self.turtle=Turtle(x)11 self.fish=Fish(y)12 defprint_num(self):13 print(self.turtle.num,self.fish.num)14 15 pool=Pool(1,10)16...