Implementation of a Linear equation solving algorithm in Python

 <<algorithm

example of an algorithm solving the linear equation

a = float(input('a = '))
b = float(input('b = '))
if a == 0:
    if b == 0:
        print('Identity equation')
    else:
        print('Contrary equation')
else:
    x = -b/a
    print('x =', x)