Server IP : 162.213.251.212 / Your IP : 3.147.51.147 [ Web Server : LiteSpeed System : Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : allssztx ( 535) PHP Version : 8.1.31 Disable Function : NONE Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/lib64/python2.7/Demo/turtle/ |
Upload File : |
� Afc @ so d Z d d l m Z m Z d d l m Z d � Z d � Z d � Z e d k rk e � Z e GHe � n d S( s� turtle-example-suite: tdemo_tree.py Displays a 'breadth-first-tree' - in contrast to the classical Logo tree drawing programs, which use a depth-first-algorithm. Uses: (1) a tree-generator, where the drawing is quasi the side-effect, whereas the generator always yields None. (2) Turtle-cloning: At each branching point the current pen is cloned. So in the end there are 1024 turtles. i����( t Turtlet mainloop( t clockc c s� | d k r� g } x[ | D]S } | j | � | j � } | j | � | j | � | j | � | j | � q Wx) t | | | | | � D] } d Vq� Wn d S( s� plist is list of pens l is length of branch a is half of the angle between 2 branches f is factor by which branch is shortened from level to level.i N( t forwardt clonet leftt rightt appendt treet None( t plistt lt at ft lstt pt qt x( ( s. /usr/lib64/python2.7/Demo/turtle/tdemo_tree.pyR s c C s� t � } | j d � | j � | j d � | j d d � | j d � | j � | j d � | j � t | g d d d � } x | D] } q� Wt | j � j � � GHd S( Ni i iZ i.���i� iA gffffff�?( R t setundobufferR t hideturtlet speedt tracerR t penupR t pendownR t lent getscreent turtles( R t tR ( ( s. /usr/lib64/python2.7/Demo/turtle/tdemo_tree.pyt maketree'