File: //usr/local/lib/python3.7/turtledemo/__pycache__/rosette.cpython-37.opt-1.pyc
B
"��gQ � @ sX d Z ddlmZmZmZ ddlmZmZ dd� Z dd� Z
edkrTe
� Ze
e� e� d S )
aF turtle-example-suite:
tdemo_wikipedia3.py
This example is
inspired by the Wikipedia article on turtle
graphics. (See example wikipedia1 for URLs)
First we create (ne-1) (i.e. 35 in this
example) copies of our first turtle p.
Then we let them perform their steps in
parallel.
Followed by a complete undo().
� )�Screen�Turtle�mainloop)�perf_counter�sleepc C s� | g}x6t d|�D ](}| �� }|�d| � |�|� |} qW x`t |�D ]T}t|d | �|d }x6|D ].}|�d| � |�d| d|� |�|� qjW qHW d S )N� g �v@g @gffffff�?r )�rangeZcloneZrt�append�abs�pencolor�fd)�p�neZszZ
turtlelist�i�q�c�t� r �./usr/local/lib/python3.7/turtledemo/rosette.py�mn_eck s
r c C s� t � } | �d� t� }|�d� |�� |�d� |�d� | �dd� t� }t |dd� t� }|| }t
d� t� }x4tdd � | �� D ��r�x| �� D ]}|�
� q�W qxW t� }d
|| | S )NZblackr Zred� �$ � r c s s | ]}|� � V qd S )N)Zundobufferentries)�.0r r r r � <genexpr>7 s zmain.<locals>.<genexpr>zruntime: %.3f sec)r Zbgcolorr ZspeedZ
hideturtler ZpensizeZtracer�clockr r �anyZturtlesZundo)�sr
Zat�etZz1r r r r �main$ s&