[MUSIC] We've made it to the final part of the course, and perhaps you'd really like to start writing some programs. But first, let's get a quick recap of where we've been in the course. And understand why we wait until the end to do the coding. >> First, we saw the computational thinking as a problem solving process that is based on concepts from computer science. And then we get to algorithms which are what we need to communicate to computer so that we can use it to solve the problems. Finally, we got an understanding of what the computer is capable of doing, and we use that to develop a more structured way of expressing the algorithm and then we called that pseudo code. >> Programming is just the end of the computational thinking process. It's the act of expressing an algorithm using a syntax that the computer can understand. No matter what programming language you use, everything you've seen up until now about computational thinking, algorithms, and computer hardware, will stay the same. In this course, we've decided to use the Python programming language. The syntax is very similar to the pseudo code that we saw previously. >> I think it's fair to say that we're not really teaching you Python as much as exposing you to it. As we're going to see, Python is very easy to pickup. It's a great first language to learn. There are lots of advanced features that we won't see in this course, but our goal is for you to be able to read and write simple Python programs. So that you can express your own algorithms in a way that they can be run on a computer as part of your own problem solving process. >> Let's get started by looking at some Python code. Don't worry if you don't understand it all just yet, but you'll definitely recognize a lot based on what you've seen in the course so far. So do you have any idea what this simple Python program does? Let's look at it together. The first line creates a variable called values. Rather than storing a single value, it stores a list of values. In the next line, we have the variable count, which is initially set to 0. Okay, so you might be a bit confused, because this equal sign is being used to store things, rather than the arrow notation used in pseudo code. So in pseudo code, we would have written this. And you might think that the equal sign is a logical test to see if count has the value 0. But this is the syntax Python uses. Going on to the next line, here we have a loop. We're repeating the next instruction for each value in the list of values. This instruction checks whether the value is greater than zero, i.e, if it's positive, and then sets count to one more. We call this incrementing count. So at the end, the variable count represents the number of positive values in the collection. And we can print it to the screen. Initially, count is 0, so we're going to indicate that here. Count is initially 0. We start by testing the first element in values, which is -7. Since it is not greater than 0, we don't increment. Going on to the next item in the list of values we see that it's 3. 3 is bigger than 0 and so we will increment count by 1. The next element in the list is a -8, it's values is less than 0 so we don't increment count. 0, the next element in the list is 0. So again this is false and we don't increment count. However, 4 is bigger and we will increment count, -2 is less so we don't increment but 19 and 11 are both bigger. So in the end, we have a value of 4, which is what we print. It is the number of positive values in the list. Pretty easy, right? In this course, you don't need to download or install anything to program in Python. You'll do everything from within the code blocks in the Coursera platform. This is the code block that you'll see in your browser with the code we just saw on the previous slide. You can click on the run button over here to run this code. After a second or two, you'll see the output of the code down here. This is the 4, which was the number of positive values in the list. We'll be using these sorts of code blocks throughout the course, which will allow you to focus just on the programming without having to worry about installing any software. Again, it's okay if you didn't understand all that code yet. But hopefully, it looks somewhat familiar and not too scary. In the remainder of the course, we'll revisit some of the concepts we've already seen, and see how they're expressed using python syntax. We'll look at variables that hold a single value or a collection of values, and we'll look at different mechanisms of control flow, such as conditional execution, iteration, and functions. And finally, we'll see the Python code for some of the algorithms we've looks at including implementations for our case studies from the LGBT and working dog centers. And if you do decide that you want to play around with Python more after this course ends, we'll also give you some pointers on how to do that.