---
id: 6331d233b51aeedd1a2bd645
title: "How to Solve for X: Extra"
challengeType: 15
videoId: lFTCVUCbNoM
dashedName: how-to-solve-for-x-extra
---

# --description--

This video will go deeper, with more examples of how to use SymPy solve. It will also explain how the practice functions generate the random problems.

Here is the <a href="https://colab.research.google.com/drive/1Jv6WxW93J_1GZao8DkNb4X0D93oVibbs" target="_blank" rel="noopener noreferrer nofollow">Colab notebook to go along with this video.</a> Use it to add more to the algebra Colab notebook that you are building.

# --assignment--

Add the code for more ways to solve for x from the video to your algebra Colab notebook.

---

Open the following Colab notebook, run the cell, and <a href="https://colab.research.google.com/drive/1XjmHoERFKcvol7FPidQE-wgdvR82HV45" target="_blank" rel="noopener noreferrer nofollow">practice solving one and two-step algebra problems.</a> As a bonus, look at the code that generates the practice problems.

# --questions--

## --text--

If you import sympy and define x as a variable, what would be the output from the following code?

```py
example = 3*x - 12
equation = Eq(example,0)
solution = solve(equation,x)
print(solution)
```

## --answers--

3

---

4

---

[4]

---

x = 4

## --video-solution--

3
