Save this video free

Python (Fall 2026) Module 4-2: Operators and Expressions

Bill Moseley, Ph.D. - Computer Science Educator · 10:51 · Watch on YouTube

Part of Bakersfield College COMP B10. See all 36 lectures and search them

These notes were made with YouTube Collector. Paste any YouTube link and get the same: a summary, chapters and a searchable transcript.

Overview

Bill Moseley explains Python assignment and arithmetic operators, including how `*`, `/`, `**`, `%`, and `//` work with concrete numeric examples. He contrasts true division with floor division, introduces compound assignment, and demonstrates Python's PEMDAS order of operations with a nested expression that evaluates to 8,214.

Key takeaways

Chapters

0:00 Python Assignment and Basic Arithmetic Operators
3:00 Powers, Remainders, Floor Division, and Compound Assignment
7:30 PEMDAS in Python Expressions

Keep these chapters and the full searchable transcript in your own library.

Transcript excerpt

0:01 So let's get into operators and expressions.  Operators and expressions are about manipulating data. And so let's start with an operator here.  We've already used this one, right? The assignment operator is a single equal sign. And it tells  us that this is equal to this. So we're taking this number, putting it in the container,  we're assigning the value of that container. So in that case, x is equal to three. We'll start with the simple ones. Addition.  The addition operator allows us to create an expression. Right? This is an expression. Looks  like a formula. You can kind of think of it that

0:53 way. But an expression has one or more values,  or two or more values, and one or two or more operators. Okay? So it has to have at least  two values, x and three. x and three. This is an expression up here as well. And at least one  operator. So the operators are the signs that we use to do the math. Here we go. So x = 3 + 1.  What's the value of x in this expression? Four. Subtraction. We know how subtraction  works. x = 3 - 1, or x = 2. Multiplication looks maybe a little bit different  than what we're used to. If we're not used to programming, typically in multiplication, we  use a dot, or we use an x, or some other symbol.

1:46 In programming, the symbol that we use is the  asterisk. And the reason for that is because the other symbols, dots and x's and things like that,  are used up by other functions. So in this case, x = 3 * 2, or the x is what? Six. Division. Now  division, we're used to maybe writing something over something else. In this case, we are writing  division in a linear format. So, we're using the

This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.

In this course

Related notes

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Bill Moseley, Ph.D. - Computer Science Educator.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.