| Server IP : 118.27.122.248 / Your IP : 216.73.216.230 Web Server : Apache System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64 User : c9415830 ( 11735) PHP Version : 8.4.17 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/alt/python36/lib64/python3.6/turtledemo/__pycache__/ |
Upload File : |
3
x2_� � @ s� d Z ddlT ddlZG dd� de�ZG dd� de�Zdd � Zd
d� Zdd
� Z dd� Z
dd� Zd%dd�Zdd� Z
dd� Zdd� Zdd� Zdd� Zdd� Zd d!� Zd"Zd#Zed$kr�e� Ze� dS )&a�
sorting_animation.py
A minimal sorting algorithm animation:
Sorts a shelf of 10 blocks using insertion
sort, selection sort and quicksort.
Shelfs are implemented using builtin lists.
Blocks are turtles with shape "square", but
stretched to rectangles by shapesize()
---------------------------------------
To exit press space button
---------------------------------------
� )�*Nc @ s, e Zd Zdd� Zdd� Zdd� Zdd� Zd S )
�Blockc C sF || _ tj| ddd� | j� | j|d dd� | jd� | j� d S )NZsquareF)�shapeZvisibleg �?� �black)�size�Turtle�__init__Zpu� shapesize� fillcolor�st)�selfr � r �?/opt/alt/python36/lib64/python3.6/turtledemo/sorting_animate.pyr s
zBlock.__init__c C s | j d� d S )NZred)r )r
r r r �glow s z
Block.glowc C s | j d� d S )Nr )r )r
r r r �unglow"