Question: python program. Numerous engineering and scientific applications require finding solutions to a set of equations. Ex: 8x + 7y = 38 and 3x - 5y
Numerous engineering and scientific applications require finding solutions to a set of equations. Ex: 8x + 7y = 38 and 3x - 5y = -1 have a solution x = 3, y = 2. Your program should take all the integer coefficients of the two linear equations with variables x and y as input and use brute force to find a solution (integer) for x and y in the range -20 to 20. You can assume the two equations have no more than one solution. Brute force approach: For every value of x from lower range to upper range For every value of y from lower range to upper range Check if the current x and y satisfy both equations. If so, output the solution, and finish. Ex 1: If the input is: 8 7 38 3 -5 Then the output is: x = 3, y = 2 Ex 2: If no solution is found, output: There is no solution
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
