[MUSIC] Welcome to class. It's a pleasure to be here. My name is Joe Warren, I've taught on Coursera for almost five years, and it's always exciting to work with a new group of students. In this specialization we're going to teach you how to script in Python 3. Scott's role is to teach you the intricacies of programming in Python. My role, well, beyond comic relief, is to kind of teach you more general programming concepts that can carry over to many different languages. Now in this lecture what I'm going to do is I'm going to talk a little about the environment where you're going to write your Python code develop an environment. Before I dive into the lecture, I want to say a little about my philosophy about how I'm going to deliver the knowledge in this lecture. There's a saying that says if you give a man a fish, you feed him for a day. But if you teach a man to fish, you feed him for a lifetime. What I'd like to do in this lectures is teach you how to fish. I'd like to teach you how to gather the knowledge that will make you an effective Python's scripter. So let's dive into the lecture All right, let's talk about Python Developement Environments. So an acronym that you're going to to hear used fairly often is IDE. Now I could just start off by telling you what an IDE is. But we talked about learning how to learn, so kind of my first kind of clue here is use web search, use Google. So if you want to know what an IDE is let's go through and say what is an IDE. And Google helpfully comes back with some results, the first one, non-metallic electro-negative. That must be something related to chemistry. But the next two look they're related to software. That's good. In fact, let's hit the Wikipedia link here. And you can see that it says an ide is an integrated development environment. It's a software application that provides facilities for computer programmers to write software. So for this class it is going to be a place where we write our Python code, we run our Python code, we test our Python code, we save it. So in this specialization, we're going to actually use several different IDEs at different stages during the specialization. For the first course, we're going to use CodeSkulptor. In the remaining courses we're going to use some desktop IDEs for Python. What I'll do is I'll give you a very quick overview of each of these IDEs, and then we'll follow-up with some written guides on how to install and use these environments. All right let's talk about the Python IDE that we're going to use for this course and the specialization. Now since most of you are actually beginners in terms of writing Python code, we're going to use an IDE that's extremely easy to use. It's designed for beginners. Its CodeSkulptor. It's IDE that we've actually used in our previous specialization on Python 2. So access it all you need to do is go to the following web address, py3.codeskulptor.org. And what you'll see pops up here is a page that includes several things. It's a row of buttons that control the execution of your program, a window that contains your code. And over here, a console that actually displays the output from your program. So now here, we have our program that does something where it prints out a little interactive window. Let's go through and write, kind of the simplest program that we can think of in Python 3. I'm going to write Hello World. So the first thing we need to do is we've got all this code here we need to get rid of. So a quick way to do that is just click in the pane and hit CTRL+A, that selects everything in the window. Hit Backspace, it's all gone. And now let's say print "Hello World!" And this button at the top here actually runs your program. And sure enough, you see over here Hello World! So, we've written and run a program inside CodeSkulptor. And notice this is running Python 3. There's a Python 2 version of this, it's just at www.codeskulptor.org so always look for CodeSkulptor 3 to make sure you're running Python 3. Okay, what else should we be able to do in an IDE, we should be able to write it and run it, you should also be able to save it. So because CodeSkulptor runs in your web browser we can't automatically save files from the web browser to your local file system. That's a security risk in all modern web browsers. So what we have is we have a save button here, That goes through and generates for us a url that's an extension of py3.codeskulptor.org. So up here we have an ID which says where you program is uniquely saved in Google Storage. So the interesting thing about this is that if I copy this and say paste it into a new clean tab. What comes back up is print hello world again. So one way you can save your program is just simply save it to the cloud and then save this url. What I typically do is I actually mail the url to myself to make sure I always have a copy of it. Notice if you happen to mess up and forget the url you can always find it in your web browser history. I'm not going to talk more about CodeSkulptor3 because there's going to be a very detailed, written guide that tells you how to use CodeSkulptor3. What I'd like to do instead is talk a little bit about two other IDEs we're going to use at later points in the specialization. So you can kind of see some contrast and similarities between three different Python IDEs. All right for the first course in the specialization we recommend especially if you're beginner that you use codeskulptor to write your programs. There is no installation, you can view you code very quickly and you can save it in the cloud. For the remaining classes of the specialization we're going to encourage you to migrate to the desktop. Note if you're an experienced person you like to work on the desktop in the first class feel free go right ahead. So to kind of give you experience with the desktop tools that real Python scripters use. Scott and I are going to use two different IDEs to do the live coding demos for the remaining courses. I'm going to use the tool shown here which is called Thonny. So Thonny is a tool built for beginning Python programmers to work on the desktop. It has some advantages, there is only one installation to install both Python and Thonny. It has very nice debuger that you can use, to kind of examine what's gone wrong with your code. And it handles installation of packages, which is a critical activity for Python scripters in a very nice way. Now the layout of Thonny is very similar to what you would see in CodeSkulptor. Here's a code window where you can enter some code. So I can say print("Hello, World!") And I can run it by hitting the screen button and down here in the console, sure enough, I see, hello world. Because this tool runs on the desktop, I can go in here and save, and it gives me the option of saving my program on the desktop. Now, Thonny is the tool I use and it's designed to be very simple. Some of you probably want a more full featured programming environment for Python. So I'll finish off by showing you the programming environment that Scott will use in the second, third and fourth classes in this specialization. Okay, let's finish off this lecture by looking at a Python IDE, that's more full featured. Something that you might use when you finish the specialization. This particular IDE is based on Atom, which is just the general purpose editor, that's essentially connected to Python. And so what we can do is we can sit here in the code window and actually type in a program like we'd normally do. So let's do hello world. So I'm going to say print and something interesting here. Notice I put print parentheses Atom actually anticipated that I'm actually going to use a print function in Python so it put in both the opening and closing parentheses. I need to put in the string "hello world." so notice I put it in a double quote. Atom again put in a second double quote so now I need to type in "hello world" and now I need to run it. So one of the things about this is you run the program using a key sequence, in this case ALT R. And over here in the console come out "hello world." so, this is an example of more full featured IDE. I don't recommend that you try use this early in the class unless you've had significant experience in coding, but it is something that you can migrate to as you become more comfortable working with Python. Okay, thanks I'll see you in the next lecture.