Transfer Matrix Method Python Coder