Python code for EE263 homework problems