> For the complete documentation index, see [llms.txt](https://docs.bdb.ai/bdb-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bdb.ai/bdb-documentation/data-science-lab/various-tabs-to-work-with/notebook/notebook-page/notebook-cells/using-a-code-cell.md).

# Using a Code Cell

{% hint style="success" %}
*Check out the given walk-through on how to use a Code Cell under a Notebook.*
{% endhint %}

![Using a code cell under a Notebook](/files/Vm18gyhAZKr307j4JXBu)

You can write and execute code using the Notebook interface. This section covers the steps to write and run a sample code in the Code cell of the BDB DSL Notebook.

* Navigate to a Notebook.
* A cell to write and execute code opens under the selected Notebook.

![By default a Code gets added to a new Notebook ](/files/pKXdU5j3I7JVBkZUzLGg)

* Write code inside the cell.
* Click the ***Run cell*** icon to run the code.

![Write the code and run it](/files/PxWQp3vw0EtiBMSOFWxy)

* The Run cell button gets changed into the Interrupt cell icon while running the code.
* Another code cell gets added below (as shown in the following image).&#x20;

![While running the first cell one more cell gets added ](/files/szQr917t5FoamLPHO9vj)

* Once the code is run successfully a checkmark appears below the Run cell icon.
* The number before a cell indicates the count of the input executions for the notebook.

![When code gets run successfully](/files/s2Fx6Pf6ZD913XeM37Tp)

* Click the Save icon provided for the Notebook.
* The Notebook gets saved with the new update.
* A notification message appears to indicate the completion of the action.         &#x20;

![Saving the Notebook](/files/4nOMow1uQYy9yjtf8ke3)

{% hint style="info" %} <mark style="color:green;">Please Note:</mark>&#x20;

* *The **+Code** and **+Markdown** options provided at the bottom of a cell inserts a new cell after the given code/ Markdown cell.* &#x20;

&#x20;      ![](/files/nFYmQfuQL3KjB3UrPoML)   &#x20;

* *While the **Code** and **Markdown** options provided under the **Code** section of the Task Bar adds a new cell before the given code/Markdown cell.*

{% endhint %}
