So, where do you start if you want to write code? You could go to the command line on your computer, but it could be difficult to use unless you're already used to using the command line. Fortunately, there is an easier way. You can use Jupyter Notebook, a graphical interface, web application designed for data analysis. This browser-based tool allows you to write and run Python code interactively. We can also write directly in the file similar to how you might write in Google Docs or Microsoft Word. Jupyter Notebook has a rich set of tools and visual displays that can help us interact with our code and data. There are other tools we could use to write Python code, but we'll focus on using Jupyter Notebook for this course. In this video, we will take a look at Jupyter Notebook and go over; creating and finding directories in Jupyter Notebook, creating a new special kind of file called a notebook, naming the notebook file, running code, commenting on your code, creating headers and text in our notebook, and looking up code documentation. Jupyter Notebook is free to use, but installing it on your machine can be a little complicated. Fortunately, there's a tool that can help us get the job done. Installing Anaconda Navigator, a tool focused on data analysis, and then using it to launch Jupyter makes your life much easier. As you follow along with this course, it's important to get a bit of hands-on experience. Inside this course, you'll get the opportunity to write codes straight from the Coursera platform and what we call Coursera Labs. It's a great way to practice and get a deeper understanding of what I'm explaining here in this video. But I also suggest you install Jupyter using Anaconda on your own machine if you can. That way, you can practice outside the Coursera classroom and you can run your own analyses when you need them. You can find our reading before the section that walks you through all the steps to get up and running. A quick disclaimer on what we'll go over regarding Jupyter Notebook. You'll find that as you gain more experience, there's more than one way to do the same thing in Jupyter Notebook. We'll show you some useful ways to work with it but you might find other methods that work for you and that's awesome. Do what you're comfortable with as long as it gets the job done. So let's get started using Jupyter Notebook. We actually start up Jupyter Notebook here through Anaconda Navigator that we installed. Anaconda has a lot of different data analysis and data science tools, but we're focusing on just Jupyter Notebook. Jupyter Notebook will be where we'll write and run all our Python code. When we launch Jupyter Notebook, a browser page will automatically open. By default, Jupyter will open in a directory, another name for a folder that already exists. This isn't ideal because it's easy to get disorganized. Before we start writing any code, let's create a new folder or directory called MyWork. This will help us stay organized as we do more work and create new files. We''ll simple just go up to this new tab here, select Folder, and then now you can see a new folder has been created called untitled folder. To rename this folder, we can click on this and then hit the button "rename". Now we can name it whatever we want. In this case I'm gonna call it MyWork. In the future, we can put things like datasets or other code inside my work in this folder, in that way it's easier for us to find whenever we're doing our work. To navigate into this folder, we simply just click on the Folders until we're in the correct place. Now that we're in MyWork we can go ahead and create our first Python Notebook. To do this, we simply click on "new" on the top right corner here, hit Python, or Python 3 specifically. And this will create a new notebook and open up in a new page. Or I should say, a new tab up here. This is the interface where we'll write and run our code. You''ll notice that our notebook is called Untitled here. To rename it, we just simply click at Untitled, and then rename it to what we want. In this case, we'll just call it HelloWorld, so we know what kind of notebook this is. To create new code, simply click on an open cell and code away. So for example I can do 21 plus 21, and then I can run this cell, and that would execute the Python code. So to run the cell, there's a few ways we can do this. We could have also went to the cell and clicked Shift Enter, and it would have run this code as well. Note that when we run the cell this way, a new cell is created if it's at the bottom. Running the code means the coding instructions will be executed by Python and the other part you see will be under the cell that you executed. In this case it reads 42, which is just 21 plus 21, what we expect. You will also notice that a new blank cell has opened up under the first. All of your code can be written in one big cell, but it's harder to read. Segmenting your code into functional trunks in different cells lets you run each piece independently. This makes troubleshooting easier because you'll have a better idea where your program stops working. If we want to use multiple cells on a notebook like this, we can create new cells by either hitting Shift Enter. As you can see, new cells get created, or we can click this Plus button, which will add new cells. Now let's learn how to comment your code to give extra details about your written code. In Python, when you start a line with a pound character, everything after that will turn teal. This indicates that it won't be run as regular code. This makes a great place to put extra notes about your code in simple non coding languages. It's important to write comments in your code. Explaining what your code does helps you understand your code when you come back to it later and it can also be very helpful when sharing your code with others. Jupyter makes organizing your code easier by using a special syntax called Markdown to create headers and other texts. If you select an empty cell and then click on the Drop-down next to the word code here, we can convert this over to a Markdown format cell. Now, when we go ahead and write in the cell, this code writes pound symbol and whatever we want here. I'll just click My Heading. Now, when we run this cell like we normally would, you'll see that the pound symbol disappears and our text now is replaced with some bold formatted characters. This allows you to better organize your work by using headings. You can also create subheadings by using multiples pound symbols before you write the rest of the header. Let's go and convert this one again to Markdown. Now, write multiple pound symbols. I'll call this my subheading. Note that if I make a new line here and use maybe four pound symbols, this will make a different kind of sub heading and running this. There you go. You can even add more text to your document about your findings and insights. This uses the Markdown syntax to make it easy for you to format your texts. If I go back to the cell here, click "Here" and now I can type in my insights and findings. Then I can use Markdown syntax. I can definitely look into this, but here I can make it a little bulleted list, one item, two items. Then I go ahead and run this. There you go. Sometimes after even with headings, it's hard to find specific things in your code. Jupyter has a built-in search function just for this. All you have to do is click outside your current cell, so the sidebar turns blue just like this, then press the F button. Now we have a find and also replace, which can help you find your things as you need. When you clicked out of the cell, you entered command mode. You can also hit "Escape" to do the same exact thing. This model allows you to do more advanced actions and edits on this notebook. I can't type in the cell like I normally would when it's blue. To enter back into edit mode, simply click on the cell you want to edit. Now I can go back into normal typing. I'll now go ahead to erase all that. There are a few different places to find documentation on the code you're writing in Jupyter. This can help you understand your code and how to use certain functions from Python or other modules. If you click on Help at the top of your screen, you'll bring up a list of links to documentation of Python, as well as for other common packages. Here you can see some packages we haven't quite discussed yet, but they can be great for your reference. Alternatively, if you need information on a specific library method or variable, you can try to place a question mark in front of whatever you're looking at. Later on we'll find out about this function called print. But to learn about it in Python, I could put a question mark and then the name print. Now if I run this cell with Shift Enter, you can see here we get some helpful documentation about understanding how print works. Another alternative way we can do this is we can pull up the documentation by using Shift Tab while your cursor is at the end of the variable or function. In this case, I'll get rid of this question mark here and then just simply hit Shift Tab while at the end and you can see this information pops up. In fact, I can expand it with this Plus button. If you look carefully, you actually notice it's the same information that we used with the question mark. This is a quick way for us to pull up information as we're working through Python. Before we completely finish everything, make sure we click on this disk icon right here to save. There's usually an automatic save, but usually it's a good idea to save your progress. After we saved everything, we can go ahead and simply close the browser tab. To quit Jupyter Notebook completely, you can look for the Quit button right up here. Doing this, it's now quit Jupyter Notebook and it's completely stopped. If you wanted to work on it again, you would relaunch it from Anaconda. Now you know everything you need to start your coding adventure.