[Solved] CCC Linear equation

$25

File Name: CCC_Linear_equation.zip
File Size: 178.98 KB

SKU: [Solved] CCC Linear equation Category: Tag:
5/5 - (1 vote)

Write a program that solves a linear equation ax = b in integers. Given two integers a and b (a may be zero), return a single integer value as a string if it exists and return no solution or many solutions otherwise.linear_eq(int, int) -> str

linear_eq(int, int) -> str

Example function calls:

>>> linear_eq(1, -2)

-2

>>> linear_eq(2, -1)

no solution

>>> linear_eq(1, -2)

-2

>>> linear_eq(2, -1)

no solution

Extra inforamtionThere are values for a and b where it does not matter what x is. The equation will always be satisfiedThere are vaules for a and b where x cannot be an integer

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CCC Linear equation
$25