PATH: //usr/lib64/python3.9/turtledemo
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
📄 __init__.py
↓
X
📄 __main__.py
↓
X
📁 __pycache__/
X
📄 bytedesign.py
↓
X
📄 chaos.py
↓
X
📄 clock.py
↓
X
📄 colormixer.py
↓
X
📄 forest.py
↓
X
📄 fractalcurves.py
↓
X
📄 lindenmayer.py
↓
X
📄 minimal_hanoi.py
↓
X
📄 nim.py
↓
X
📄 paint.py
↓
X
📄 peace.py
↓
X
📄 penrose.py
↓
X
📄 planet_and_moon.py
↓
X
📄 rosette.py
↓
X
📄 round_dance.py
↓
X
📄 sorting_animate.py
↓
X
📄 tree.py
↓
X
📄 turtle.cfg
↓
X
📄 two_canvases.py
↓
X
📄 yinyang.py
↓
X
SAVING...
BERHASIL DIUBAH!
EDITING: paint.py
#! /usr/bin/python3.9 """ turtle-example-suite: tdemo_paint.py A simple event-driven paint program - left mouse button moves turtle - middle mouse button changes color - right mouse button toggles between pen up (no line drawn when the turtle moves) and pen down (line is drawn). If pen up follows at least two pen-down moves, the polygon that includes the starting point is filled. ------------------------------------------- Play around by clicking into the canvas using all three mouse buttons. ------------------------------------------- To exit press STOP button ------------------------------------------- """ from turtle import * def switchupdown(x=0, y=0): if pen()["pendown"]: end_fill() up() else: down() begin_fill() def changecolor(x=0, y=0): global colors colors = colors[1:]+colors[:1] color(colors[0]) def main(): global colors shape("circle") resizemode("user") shapesize(.5) width(3) colors=["red", "green", "blue", "yellow"] color(colors[0]) switchupdown() onscreenclick(goto,1) onscreenclick(changecolor,2) onscreenclick(switchupdown,3) return "EVENTLOOP" if __name__ == "__main__": msg = main() print(msg) mainloop()
SIMPAN PERUBAHAN