Question 1: Solving Linear Equations: Variables…