Sympy issue with solving equation from stated conditions
Question: Hello I'm quite new to python and I'm trying to solve a set of equations with
an unknown variable, the equations are in the code below

    
    
    from __future__ import division
    import sympy as sy
    import math
    #Global Variables indepenedant of calculations 
    Tc = 9.25
    Ic = 340*10-6
    Tb = 6.2
    I = 2 *Ic
    alpha = 2*10**-2
    thickness = 100*10**-10
    L0 = 2.44*10**-8
    electrical_resist = 0.5*10**-2
    sigma = 1 / electrical_resist
    k = sigma*L0*Tc
    A = 1
    B = 1
    #set of problems to solve 
    r0 = sy.symbols('r0')
    LHS=(I/(alpha*thickness))**2 * electrical_resist 
    RHS = -k*((r0**2)*((A*math.e**Tc)+(B*math.e**0)))+(alpha/thickness) * (r0**2) * (Tc - Tb) 
    print sy.nsolve(LHS==RHS, 0.002)
    

But I keep getting an error

    
    
       2444         if isinstance(f, Equality):
       2445             f = f.lhs - f.rhs
    -> 2446         f = f.evalf()
       2447         syms = f.free_symbols
       2448         if fargs is None:
    
    AttributeError: 'bool' object has no attribute 'evalf' 
    

Any help is greatly appreciated.


Answer: `LHS==RHS` creates a boolean, True if LHS is exactly equal to RHS and False
otherwise. `nsolve` and other solve functions in SymPy assume expressions are
equal to zero, so use `nsolve(LHS - RHS, 0.002)`. See also
<http://docs.sympy.org/latest/tutorial/gotchas.html#equals-signs>.

