D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
python35
/
lib
/
python3.5
/
turtledemo
/
__pycache__
/
Filename :
round_dance.cpython-35.opt-1.pyc
back
Copy
q��Y � @ sL d Z d d l Td d � Z d d � Z e d k rH e e � � e � d S) aF turtle-example-suite: tdemo_round_dance.py (Needs version 1.1 of the turtle module that comes with Python 3.1) Dancing turtles have a compound shape consisting of a series of triangles of decreasing size. Turtles march along a circle while rotating pairwise in opposite direction, with one exception. Does that breaking of symmetry enhance the attractiveness of the example? Press any key to stop the animation. Technically: demonstrates use of compound shapes, transformation of shapes as well as cloning turtles. The animation is controlled through update(). � )�*c C s d a d S)NF)�running� r r �*/opt/python35/lib/python3.5/round_dance.py�stop s r c C s t � t d � t d � t d � d } d } d } d } t d � } xf t d � D]X } t | � t � } | | 9} | | 9} t | � | j | | d d | f d � qV Wt d | � t d � t d � t � t d d � g } xY t d � D]K } t d � t d � t d � t � | d d k r� | j t � � q� Wt � d a t t � t � d } x� t r d } xM | D]E } | j d � | j d � | j | � | d k r�d n d } q�W| d k r�t d � t | � | d 9} t � qpWd S)NZgray10FZtriangleg}�R��c�?g���y!"@� � Zcompound� g �?ZblackZmultitrir �� � � � � � Tg�G�z�?zDONE!i8������r r )ZclearscreenZbgcolorZtracer�shapeZShape�rangeZ shapesizeZ get_shapepolyZtiltZaddcomponentZregister_shapeZpuZsetpos�fd�lt�update�appendZclone�homer Z onkeypressr �listen�right)�fZphi�s�c�sh�i�pZdancers�cs�taZdancerr r r �main s^ $ r"