June 2021
Beginner
432 pages
9h 9m
English
This program creates a scrolling field of ducklings. Each duckling has slight variations: they can face left or right and have two different body sizes, four types of eyes, two types of mouths, and three positions for their wings. This gives us 96 different possible variations, which the Ducklings program produces endlessly.
When you run ducklings.py, the output will look like this:
Duckling Screensaver, by Al Sweigart al@inventwithpython.com Press Ctrl-C to quit... =" ) =") ( v)=") ( ^) ^ ^ ( v) >'') ^^ ^^ ( ^) >") ^ ^ ( v) =^^) ("< ("< >") ^^ ( >) (^ ) (< ) ( ^) ^ ^ ^^ ^^ ("< ^^ (``<>^^) (^^= (^ ) (< ...Read now
Unlock full access