Completed example Python code, and changed C++ code to use fixed-width 32-bit integers.