MCPcopy Index your code
hub / github.com/python/cpython / main

Function main

Lib/turtledemo/peace.py:11–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9from turtle import *
10
11def main():
12 peacecolors = ("red3", "orange", "yellow",
13 "seagreen4", "orchid4",
14 "royalblue1", "dodgerblue4")
15
16 reset()
17 Screen()
18 up()
19 goto(-320,-195)
20 width(70)
21
22 for pcolor in peacecolors:
23 color(pcolor)
24 down()
25 forward(640)
26 up()
27 backward(640)
28 left(90)
29 forward(66)
30 right(90)
31
32 width(25)
33 color("white")
34 goto(0,-170)
35 down()
36
37 circle(170)
38 left(90)
39 forward(340)
40 up()
41 left(180)
42 forward(170)
43 right(45)
44 down()
45 forward(170)
46 up()
47 backward(170)
48 left(90)
49 down()
50 forward(170)
51 up()
52
53 goto(0,300) # vanish if hideturtle() is not available ;-)
54 return "Done!"
55
56if __name__ == "__main__":
57 main()

Callers 1

peace.pyFile · 0.70

Calls 5

ScreenFunction · 0.85
downClass · 0.85
leftClass · 0.85
rightClass · 0.85
upClass · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…