Notebook and Code

How do I employ the codes from the notebook into the labs?? Am new to Python, and not sure how to employ the notebook files to use in the labs.

Hello @John_Felder ,

Welcome to the community!!

Kindly post it under the right category.
Check this guide : Messages & Notifications

With regards,
Nilosree Sengupta

Hi @John_Felder,

I don’t quite understand what you are asking. Can I ask you to explain it a bit more ?

As for the screenshot you shared, it is telling you, you have a syntax error. Import statements need to in independent lines.

Let’s forget python for a bit. Do you have any previous programming experience ? If so, which language ?

Best,
Mubsi

1 Like

First, you do not need to open the “Lab Files” tab.

The notebook is a series of cells - some have instructions (these are “Markdown” cells), some have Python code.

Some of the Python cells will have a place for you to add your own code. The instructions will tell you which ones. They’re identified by a comment line that says “START CODE HERE”.

The example you give in this thread is an optional lab, so you don’t have to add any of your own code. This type of lab is used as an example or a demonstration.

You should read the instructions in the notebook to see what to do.

When reading through the notebook, you should Run every cell that contains code. There are two ways to do this: left-click on the cell and either use the “Run” button in the menu, or type shift-Enter.

Be extremely careful that you do not add any additional cells to the notebook. This will almost always cause problems, unless you are highly skilled in use of notebooks.

To remove a cell, left-click on it, then use the Edit menu, and select “Delete Cells”.

Last, if you have no Python programming experience, I strongly recommend you immediately attend a Python tutorial course, then come back to this course. The DLAI courses all assume you already have the essential skills to program in Python.