12.07.2015 Views

Think Python - Denison University

Think Python - Denison University

Think Python - Denison University

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4.12. Exercises 37Exercise 4.2 Writean appropriately general set of functions that can draw flowers likethis:You can download asolution fromthinkpython.com/code/flower.py.Exercise 4.3 Writean appropriately general set of functions that can draw shapes likethis:You can download asolution fromthinkpython.com/code/pie.py.Exercise 4.4 The letters of the alphabet can be constructed from a moderate number of basic elements,like vertical and horizontal lines and a few curves. Design a font that can be drawn with aminimal number of basicelements and then writefunctions that draw lettersofthe alphabet.You should write one function for each letter, with names draw_a,draw_b, etc., and put your functionsin a file named letters.py. You can download a “turtle typewriter” from thinkpython.com/code/typewriter.pytohelp you testyour code.You can download asolution fromthinkpython.com/code/letters.py.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!