Server IP : 68.65.122.142 / Your IP : 3.133.123.148 Web Server : LiteSpeed System : Linux server167.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64 User : glenirhm ( 1318) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /lib64/libboost-plesk-1.74/../tcl8.6/../python3.8/turtledemo/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
#! /usr/bin/python3.8 """ turtle-example-suite: tdemo_peace.py A simple drawing suitable as a beginner's programming example. Aside from the peacecolors assignment and the for loop, it only uses turtle commands. """ from turtle import * def main(): peacecolors = ("red3", "orange", "yellow", "seagreen4", "orchid4", "royalblue1", "dodgerblue4") reset() Screen() up() goto(-320,-195) width(70) for pcolor in peacecolors: color(pcolor) down() forward(640) up() backward(640) left(90) forward(66) right(90) width(25) color("white") goto(0,-170) down() circle(170) left(90) forward(340) up() left(180) forward(170) right(45) down() forward(170) up() backward(170) left(90) down() forward(170) up() goto(0,300) # vanish if hideturtle() is not available ;-) return "Done!" if __name__ == "__main__": main() mainloop()