# What is SymPy?

In [5]:

```
from sympy import Symbol, lambdify
def Unit(x):
if(x != 0):
return 0
else:
return 1
x = Symbol('x')
x
```

Out[5]:

### Maths formatted output!¶

In [6]:

```
fx = x**2 + Unit(x)
fx
```

Out[6]:

In [7]:

```
lam_f = lambdify(x, fx, modules=['sympy'])
lam_f
```

Out[7]:

In [8]:

```
print(lam_f(-1)) # prints 1
```