Question 1: Solving Linear Equations: Variable…