Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ init
Method
init
Lib/turtledemo/planet_and_moon.py:46–49 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
44
self.resizemode(
"user"
)
45
self.pendown()
46
def
init(self):
47
dt = self.gravSys.dt
48
self.a = self.acc()
49
self.v = self.v + 0.5*dt*self.a
50
def
acc(self):
51
a = Vec(0,0)
52
for
planet in self.gravSys.planets:
Callers
1
init
Method · 0.45
Calls
1
acc
Method · 0.95
Tested by
no test coverage detected