| Server IP : 121.121.20.254 / Your IP : 216.73.216.42 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Python315/Lib/turtledemo/__pycache__/ |
Upload File : |
R
>lqjx c �x � Q s ] QHGsGs ] QHGs Q sQ sQ s \
Q6X c \ 2 s\ \2 \ 2 P! P! )ar turtledemo/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 # �D � U]6� c� , oS F Dh oUO U2 UO 2 oUO U2 UO U2 UO U2 UO U2 Jj [ VAU* V#2 F D oPw � J
P! P! 3h)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.)�forward�clone�left�right�append�tree)�plist�l�a�f�lst�p�q�xs &&&& �$C:\Python315\\Lib\turtledemo\tree.pyr
r
s� � � � �1�u����A�
�I�I�a�L���� �A�
�F�F�1�I�
�G�G�A�J��J�J�q�M��J�J�q�M�
� �c�Q�3��%�A��J� &�
�s �B �BB c �v � [ 2 o U O P2 U O 2 U O ] 2 U O 2 O ]] 2 U O
]Z2 U O 2 U O Q2 U O 2 [ U ,]�]AQ2 oSF D oJ P! )Ngffffff�?i.���)r �
setundobuffer�
hideturtle�speed� getscreen�tracerr �penupr �pendownr
)r �tr s r �maketreer $ s� � ���A��O�O�D���L�L�N��G�G�A�J��K�K�M����A���F�F�2�J��G�G�I��I�I�d�O��I�I�K��a�S�#�r�6�"�A�
��� � c �^ � [ 2 o [ 2 [ 2 oQ V*
* ! )zdone: %.2f sec.)�clockr )r
�bs r �mainr"