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

Method pentpiece

Lib/turtledemo/bytedesign.py:82–104  ·  view source on GitHub ↗
(self, initpos, scale)

Source from the content-addressed store, hash-verified

80 self.getscreen().update()
81
82 def pentpiece(self, initpos, scale):
83 oldh = self.heading()
84 self.up()
85 self.forward(29 * scale)
86 self.down()
87 for i in range(5):
88 self.forward(18 * scale)
89 self.right(72)
90 self.pentr(18 * scale, 75, scale)
91 self.up()
92 self.goto(initpos)
93 self.setheading(oldh)
94 self.forward(29 * scale)
95 self.down()
96 for i in range(5):
97 self.forward(18 * scale)
98 self.right(72)
99 self.pentl(18 * scale, 75, scale)
100 self.up()
101 self.goto(initpos)
102 self.setheading(oldh)
103 self.left(72)
104 self.getscreen().update()
105
106 def pentl(self, side, ang, scale):
107 if side < (2 * scale): return

Callers 1

wheelMethod · 0.95

Calls 12

pentrMethod · 0.95
pentlMethod · 0.95
upMethod · 0.80
downMethod · 0.80
rightMethod · 0.80
gotoMethod · 0.80
setheadingMethod · 0.80
leftMethod · 0.80
getscreenMethod · 0.80
headingMethod · 0.45
forwardMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected