×
×

Here is a simple class that draws a (grim) face in a graphics window: # face . py from

ISBN: 9781590282755 474

Solution for problem 13 Chapter 10

Python Programming: An Introduction to Computer Science | 3rd Edition

• Textbook Solutions
• 2901 Step-by-step solutions solved by professors and subject experts
• Get 24/7 help from StudySoup virtual teaching assistants

Python Programming: An Introduction to Computer Science | 3rd Edition

4 5 1 400 Reviews
31
5
Problem 13

Here is a simple class that draws a (grim) face in a graphics window: # face . py from graphics import * class Face: def __ init __ (self, window, center, size): eyeSize = 0.15 * size eyeOff = size I 3.0 mouthSize = 0.8 * size mouthOff = size I 2.0 self . head = Circle(center, size) self . head . draw(window) self . leftEye = Circle(center, eyeSize) self . leftEye . move(-eyeOff, -eyeOff) self . rightEye = Circle(center, eyeSize) self . rightEye . move(eyeOff, -eyeOff) self . leftEye . draw(window) self . rightEye . draw(window) p1 = center . clone() p1 . move(-mouthSizel2, mouthOff) p2 = center . clone() p2 . move(mouthSizel2, mouthOff) 361 362 Ch self.mouth = Line(p1,p2) self.mouth.draw(window) Add methods to this class that cause the face to change expression. For example you might add methods such as smile, wink, frown, flinch, etc. Your class should implement at least three such methods. Use your class to write a program that draws a face and provides the user with buttons to change the facial expression.

Step-by-Step Solution:
Step 1 of 3

• Memory- getting things into the brain and then getting them out (retaining info) • We are constantly reconstructing our memories o We do this to make sense and to save time • Memory illusion- thinking a memory is true but really its not o Brain goes above just the info o Does this to get the best picture • Reconstructive memory- constructing memories,...

Step 2 of 3

Step 3 of 3

Related chapters

Unlock Textbook Solution