Matrix Coding Problems Python Idle