This course introduces the basics of Python 3, including conditional execution and iteration as control structures, and strings and lists as data structures. You'll program an on-screen Turtle to draw pretty pictures. You'll also learn to draw reference diagrams as a way to reason about program executions, which will help to build up your debugging skills. The course has no prerequisites. It will cover Chapters 1-9 of the textbook "Fundamentals of Python Programming," which is the accompanying text (optional and free) for this course.
The course is for you if you're a newcomer to Python programming, if you need a refresher on Python basics, or if you may have had some exposure to Python programming but want a more in-depth exposition and vocabulary for describing and reasoning about programs.
This is the first of five courses in the Python 3 Programming Specialization.

RD

Great course to learn the basics of Python. Loved the instructors and loved the detail-oriented lectures and learning material. Would highly recommend to anyone serious about learning Python.

PS

May 10, 2019

Filled StarFilled StarFilled StarFilled StarFilled Star

very nice explain of each and every topic in deeply nice textbook concepts with own e-notes its covered almost good content about basic python it is really good course for beginner in this :)

Aus der Unterrichtseinheit

Booleans and Conditionals

In week three you will learn a new python data type - the boolean - as well as another control structure - conditional execution. Through the use of video lectures and the Runestone textbook, you will learn what Binary, Unary, Nested, and Chained Conditionals are, as well as how to incorporate conditionals within an accumulation pattern.

Unterrichtet von

Paul Resnick

Michael D. Cohen Collegiate Professor

Steve Oney

Assistant Professor

Jaclyn Cohen

Lecturer

Skript

So, there are two more useful operators for producing Boolean values. First, we're going to go over in and then we're going to go over its opposite not in. So, in checks to see if the thing on the left is a member of the thing on the right. So for example here, suppose that we have a string apple and we want to check if some substring is contained in that string. So, the value of this expression is going to be true, because the character p is an apple. The value of this expression is going to be false, because the character i is not an apple. The value of this expression is going to be true, because the substring AP is an apple. And the value of this expression is going to be false, because PA is not an apple. So, I should get true, false, true, false. So, if I print out is a in the string a then I should get true, because yes, even though these two things are the same, technically this is inside of this. Same thing with if I spell out apple. So, the value of both of these expressions will be true. Somewhat weirdly, if I check to see if an empty string is contained in any other string, then I'm going to get true. So, is this empty string inside of the string a? It's debatable what the answer should be, but the way that Python evaluates this expression I get true. So, if I check to see if this empty string is in the string apple, I'm going to get true for this as well. Now, the opposite of in is not in. So, if I check to see if something is not in another string, then I'm going to get true if it's not in that string. So, x is not in apple. So, the value of this overall expression is going to be true because the string apple doesn't contain the character x. So, somewhat confusingly, this not has the same spelling as something like not Boolean expression, but these are entirely different things. They have the same function which is reversing the value of the Boolean expression, so I'm saying not B is going to be true if B is false in not in is going to be true if this is not in it, but to Python, there are different kinds of expressions. So, I just want to also illustrate that in also works with lists. So, here if I check to see if this item is in this list, I'm going to get the value false because it's checking to see is there an item in this list, whose value is just the string A, even though I have some strings that happen to contain As there's no item whose value is equal to A, so I get false for this expression. That's all for now until next time.