[MUSIC] I'm Professor Seth Frey and this is our second lesson in python programming. To review, we've learned that python is a programming language, we can write code that does things, we're going to be learning it in a notebook environment. That notebook environments are composed of code blocks that we can write and run and move around. You're going to encounter errors which are common. Errors are a fact of life and you'll get better at dealing with them. And there is a functionality called kernel, restart and if you feel like you broke something, if you're not sure where you are, where you stand, you can always restart. And what that does is it doesn't wipe your memory, it doesn't wipe all your progress of your code, but it does wipe pythons memory of how far down your code it is, of which code it's run. After restarting, you'll have to run the first code block and the second you'll start running from the top and on and on down to where you left off. The objectives of this lesson, we're going to learn to put together arithmetic operations. Like in basic algebra, we're going to run sequences of commands, one over the other to make a code block that has more than one line at a time. We're going to learn how to create and change variables and we're going to learn what modules are a little bit of jargon. Every lesson is going to start with boilerplate code that you don't have to understand, you just run it. So we're going to run it and it's going to set your environment up so that you can make it through the rest of the notebook. We're going to start off just typing out code, running code and typing it out. And I have here three plus five, and if we run it, let's cross our fingers. We got eight, the output here, eight. We should feel good about that, It means we're on solid ground. You should just try typing commands out yourself. I know it sounds elementary, but it gets you in the habit. Now having written that, I'm going to run and I get 11, just like I'd expect. We're going to encounter here our first check block, our first tryout block. I wrote these to give you constant feedback as you're learning so that you know you understand. So that you're following along so that you're interacting with the notebooks and engaging with them actively. So what I'm asking you to do in this one is you're starting out with dot and I'm asking you to type out three plus five. You're going to get correct and that means that that everything you wanted to happen, happened. When you did this just now, when you ran try it out. It might be because you haven't run all the code blocks above this block specifically, it might be that you didn't run the boilerplate code. So make sure you do that and then this code should work after you run the boilerplate code. So in Python, you can do simple things. You can represent numbers with decimals, 0.5. There it is, 0.5. You can represent fractions, two over three. You can represent parenthetic operations, combinations of operations, four plus five minus three times two. What should that be? Let's say six, no it should be three should come out to three, wonderful. So as we run each of these, we'll get just what we wanted. Two multiplication signs that gives you exponentiation. So that's two to the third, or two times two times two, we should get eight. Very nice in our output right there, just like we expect. And scientific notation, we can also represent incredibly large or very small numbers with the e notation that you might have learned. We're not going to use a lot of that, but it's there. One difference from a calculator is that you can add spaces. So these two lines actually these three lines, 1,2 and 3, they should all give the same answer even though they use spaces differently. This one uses no spaces, this one uses lots of spaces, but this one uses spaces in a way that kind of makes sense. In a way that makes it easier to read all this code. What should you do? You should do what makes sense. Don't use commas. So if I was the add commas to a million here, my code would break, I would get an error. No, even worse. Something totally random will happen. Don't use commas in your numbers. A million has six zeros, just leave it like that. Having made it this far with a new bunch of examples to make sure you understand these basics how to represent numbers.