| Server IP : 162.241.219.206 / Your IP : 216.73.216.195 Web Server : Apache System : Linux box5669.bluehost.com 5.14.0-687.15.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jun 11 08:51:45 EDT 2026 x86_64 User : signavd5 ( 2863) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib64/python3.9/turtledemo/__pycache__/ |
Upload File : |
a
�ix � @ sX d Z ddlmZmZ ddlmZ dd� Zdd� Zdd � Z e
d
krTe � Zee� e� dS )a� 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.
� )�Turtle�mainloop)�perf_counterc c sr |dkrng }| D ]>}|� |� |�� }|�|� |�|� |�|� |�|� qt||| ||�D ]
}dV qbdS )z� 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.� N)�forwardZclone�left�right�append�tree)Zplist�l�a�fZlst�p�q�x� r �'/usr/lib64/python3.9/turtledemo/tree.pyr
s
r
c C st t � } | �d � | �� | �d� | �� �dd� | �d� | �� | �d� | � � t
| gddd�}|D ]}qjd S )Nr � �Z i.����� �A gffffff�?)r Z
setundobufferZ
hideturtleZspeedZ getscreenZtracerr Zpenupr Zpendownr
)r �tr r r r �maketree'