| Server IP : 162.144.4.212 / Your IP : 216.73.216.108 Web Server : Apache System : Linux gator2125.hostgator.com 5.14.0-162.23.1.9991722448259.nf.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 31 18:11:45 UTC 2024 x86_64 User : cozeellc ( 2980) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib64/python3.9/turtledemo/__pycache__/ |
Upload File : |
a
�i� � @ 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� | �� | �|d dd� | �d� | �� d S )NZsquareF)�shapeZvisibleg �?� �black)�size�Turtle�__init__Zpu� shapesize� fillcolor�st)�selfr � r �2/usr/lib64/python3.9/turtledemo/sorting_animate.pyr s
zBlock.__init__c C s | � d� d S )NZred�r �r
r r r �glow s z
Block.glowc C s | � d� d S )Nr r r r r r �unglow# s zBlock.unglowc C s d� | j�S )NzBlock size: {0})�formatr r r r r �__repr__&