![]() Click on the vertical-dotted icon at the top right corner of your code cell.Ĭlick on the Delete cell option and the current cell will be deleted. ![]() You can remove such cells from your project easily with a single click. Deleting Cellĭuring the development of your project, you may have introduced a few now-unwanted cells in your notebook. You may click the buttons multiple times to move the cell for more than a single position. You can do so by selecting the cell that you want to move and clicking the UP CELL or DOWN CELL buttons shown in the following screenshot − When your notebook contains a large number of code cells, you may come across situations where you would like to change the order of execution of these cells. Study the different menu options under the Runtime menu to get yourself acquainted with the various options available to you for executing the notebook. The above action can also be initiated by executing the following two menu options − Note that the time difference between the two outputs is now exactly 5 seconds. It will give you the output as shown below − To run the entire code in your notebook without an interruption, execute the following menu options − Colab allows you to run all code inside your notebook without an interruption. This is obvious as you did take some time to insert the new code. Now, if you run this cell, you will see the following output −Ĭertainly, the time difference between the two time strings is not 5 seconds. Add the following two statements in the newly created code window − This is shown in the screenshot below −Ī new code cell will be added underneath the current cell. When the CODE and TEXT buttons appear, click on the CODE to add a new cell. To add more code to your notebook, select the following menu options −Īlternatively, just hover the mouse at the bottom center of the Code cell. You can clear the output anytime by clicking the icon on the left side of the output display. To execute the code, click on the arrow on the left side of the code window.Īfter a while, you will see the output underneath the code window, as shown here − You will now enter a trivial Python code in the code window and execute it.Įnter the following two Python statements in the code window − The notebook will acquire the name that you have given now. So type in this name in the edit box and hit ENTER. We will call this notebook as MyFirstColabNotebook. To rename the notebook, click on this name and type in the desired name in the edit box as shown here − Setting Notebook Nameīy default, the notebook uses the naming convention UntitledXX.ipynb. There is a code window in which you would enter your Python code. A new notebook would open up as shown in the screen below.Īs you might have noticed, the notebook interface is quite similar to the one provided in Jupyter. Step 2 − Click on the NEW PYTHON 3 NOTEBOOK link at the bottom of the screen. Step 1 − Open the following URL in your browser − Your browser would display the following screen (assuming that you are logged into your Google Drive) − Note − As Colab implicitly uses Google Drive for storing your notebooks, ensure that you are logged in to your Google Drive account before proceeding further. Follow the steps that have been given wherever needed. In this chapter, you will create and execute your first trivial notebook.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |