(n, m, r)
Returns the energy of the state corresponding to quantum number n.

    E=(n**2 * (hcross)**2) / (2 * m * r**2)
    here n is the quantum number, m is the mass of the particle
    and r is the radius of circle.

    Examples
    ========

    >>> from sympy.physics.pring import energy
    >>> from sympy import Symbol
    >>> m=Symbol("m")
    >>> r=Symbol("r")
    >>> energy(1, m, r)
    hbar**2/(2*m*r**2)
    >>> energy(2, m, r)
    2*hbar**2/(m*r**2)
    >>> energy(-2, 2.0, 3.0)
    0.111111111111111*hbar**2
Returns the energy of the state corresponding to quantum number n.
Returns the energy of the state corresponding to quantum number n .
def energy(n, m, r):
    """
    Returns the energy of the state corresponding to quantum number n.

    E=(n**2 * (hcross)**2) / (2 * m * r**2)
    here n is the quantum number, m is the mass of the particle
    and r is the radius of circle.

    Examples
    ========

    >>> from sympy.physics.pring import energy
    >>> from sympy import Symbol
    >>> m=Symbol("m")
    >>> r=Symbol("r")
    >>> energy(1, m, r)
    hbar**2/(2*m*r**2)
    >>> energy(2, m, r)
    2*hbar**2/(m*r**2)
    >>> energy(-2, 2.0, 3.0)
    0.111111111111111*hbar**2

    """
    n, m, r = S(n), S(m), S(r)
    if n.is_integer:
        return (n**2 * hbar**2) / (2 * m * r**2)
    else:
        raise ValueError("'n' must be integer")
def energy ( n , m , r ) : n , m , r = S ( n ) , S ( m ) , S ( r ) if n . is_integer : return ( n ** 2 * hbar ** 2 ) / ( 2 * m * r ** 2 ) else : raise ValueError ( "'n' must be integer" )