P&P Optica Interview Question

Write code to compare to lines