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

Function randomize

Lib/turtledemo/sorting_animate.py:115–126  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

113 qsort(shelf, pivot_new_index + 1, right)
114
115def randomize():
116 disable_keys()
117 clear()
118 target = list(range(10))
119 random.shuffle(target)
120 for i, t in enumerate(target):
121 for j in range(i, len(s)):
122 if s[j].size == t + 1:
123 s.insert(i, s.pop(j))
124 show_text(instructions1)
125 show_text(instructions2, line=1)
126 enable_keys()
127
128def show_text(text, line=0):
129 line = 20 * line

Callers

nothing calls this directly

Calls 8

disable_keysFunction · 0.85
listClass · 0.85
enumerateFunction · 0.85
show_textFunction · 0.85
enable_keysFunction · 0.85
shuffleMethod · 0.80
insertMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…