MCPcopy Index your code
hub / github.com/jwasham/practice-python / main

Function main

merge_sort/main.py:30–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28
29
30def main():
31 original = [325432, 989, 547510, 3, -93, 189019, 5042, 123,
32 597, 42, 7506, 184, 184, 2409, 45, 824,
33 4, -2650, 9, 662, 3928, -170, 45358, 395,
34 842, 7697, 110, 14, 99, 221]
35
36 numbers = original[:]
37
38 ms = MergeSort(numbers)
39
40 output = ms.sort()
41
42 if is_sorted(output):
43 print("** SUCCESS! **")
44 else:
45 print("Uh oh - not in order.")
46
47 if contain_same_ints(original, numbers):
48 print("** Contain the same elements! **")
49 else:
50 print("Uh oh - something is missing.")
51
52 print(output)
53
54
55if __name__ == "__main__":

Callers 1

main.pyFile · 0.70

Calls 4

sortMethod · 0.95
MergeSortClass · 0.90
is_sortedFunction · 0.70
contain_same_intsFunction · 0.70

Tested by

no test coverage detected