elseself eyes random choice([beadywidehappyaloof]self parttodisplaynext head def getheadstr(self)"""returns the string of the duckling' head ""headstr 'if self direction =leftget the mouthif self mouth =openheadstr +'>elif self mouth =closedheadstr +'=get the eyesif self eyes =beady and self body =chubbyheadstr +'"elif self eyes =beady and self body =very_chubbyheadstr +'elif self eyes =wideheadstr +"''elif self eyes =happyheadstr +'^^elif self eyes =aloofheadstr +'``headstr +'get the back of the head if self direction =rightheadstr +(get the back of the head get the eyesif self eyes =beady and self body =chubbyheadstr +'"elif self eyes =beady and self body =very_chubbyheadstr +"elif self eyes =wideheadstr +"''elif self eyes =happyheadstr +'^^elif self eyes =aloofheadstr +'``get the mouthif self mouth =openheadstr +'<elif self mouth =closedheadstr +'=if self body =chubbyget an extra space so chubby ducklings are the same width as very chubby ducklings headstr +ducklings