ACIL FM
Dark
Refresh
Current DIR:
/lib64/python3.9/turtledemo
/
lib64
python3.9
turtledemo
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
__pycache__
-
chmod
Open
Rename
Delete
bytedesign.py
4.15 MB
chmod
View
DL
Edit
Rename
Delete
chaos.py
951 B
chmod
View
DL
Edit
Rename
Delete
clock.py
3.13 MB
chmod
View
DL
Edit
Rename
Delete
colormixer.py
1.31 MB
chmod
View
DL
Edit
Rename
Delete
forest.py
2.9 MB
chmod
View
DL
Edit
Rename
Delete
fractalcurves.py
3.39 MB
chmod
View
DL
Edit
Rename
Delete
lindenmayer.py
2.38 MB
chmod
View
DL
Edit
Rename
Delete
minimal_hanoi.py
2 MB
chmod
View
DL
Edit
Rename
Delete
nim.py
6.36 MB
chmod
View
DL
Edit
Rename
Delete
paint.py
1.26 MB
chmod
View
DL
Edit
Rename
Delete
peace.py
1.04 MB
chmod
View
DL
Edit
Rename
Delete
penrose.py
3.3 MB
chmod
View
DL
Edit
Rename
Delete
planet_and_moon.py
2.76 MB
chmod
View
DL
Edit
Rename
Delete
rosette.py
1.33 MB
chmod
View
DL
Edit
Rename
Delete
round_dance.py
1.76 MB
chmod
View
DL
Edit
Rename
Delete
sorting_animate.py
4.93 MB
chmod
View
DL
Edit
Rename
Delete
tree.py
1.37 MB
chmod
View
DL
Edit
Rename
Delete
turtle.cfg
160 B
chmod
View
DL
Edit
Rename
Delete
two_canvases.py
1.09 MB
chmod
View
DL
Edit
Rename
Delete
yinyang.py
820 B
chmod
View
DL
Edit
Rename
Delete
__init__.py
314 B
chmod
View
DL
Edit
Rename
Delete
__main__.py
14.7 MB
chmod
View
DL
Edit
Rename
Delete
Edit file: /lib64/python3.9/turtledemo/tree.py
#! /usr/bin/python3.9 """ 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 perf_counter as 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 def main(): a=clock() maketree() b=clock() return "done: %.2f sec." % (b-a) if __name__ == "__main__": msg = main() print(msg) mainloop()
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply