[SOLVED] CCC Linear equation

20.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Linear-hkpcug.zip (10 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
Rate this product

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

  • Linear-hkpcug.zip