Python Implementation of Basic Model Used in Dissertation