
This lecture explains what programming is good for, even if you don't intend to become a software engineer. At the end of this lecture, you'll be able to download and install Python and be ready to learn to code.
The student will learn how to put values and operators together to form expressions, the most basic instruction type in Python.
Now that you've done some basic instructions in the interactive shell, let's use the file editor to write a complete program.
You've made Python execute instructions, now learn how to make Python choose which instructions to execute.
The if/else statements are the basic instruction for letting your Python programs make decisions.
Loops allow your program to execute the same code over and over again.
The while loop will execute the same code over and over as long as some condition is true, but for loops allow you to execute a set number of iterations of a loop.
You don't have to write every bit of code yourself. Python comes with several functions that your program can call to leverage the code that others have written.
You aren't limited to the functions that come with Python. You can define your own functions using the def statement. Grouping code into functions helps make your programs shorter and easier to debug.
Functions also introduce the concept of scopes. Learn the difference between global scope and local scopes for variables.
Instead of crashing, you can have your programs gracefully handle errors as they come up.
You've learned several basic programming concepts. Let's apply them to make a simple "Guess the Number" game.
Lists are values that themselves can contain multiple values. Learn how lists can expand your programs' capabilities.
There are several instructions that can be used with lists. This lecture introduces multiple assignment and revisits for loops.
You don't have to write basic operations from scratch. Instead, learn about the methods that the list data type already comes with.
Most of the things you've learned about lists also apply to strings. Two for one!
Dictionaries also can contain multiple values. By using key-value pairs, you can begin to organize large amounts of data.
Dictionaries and lists can contain multiple values, including other dictionaries and lists. Combining them together you can organize your data into data structures.
There's much more to strings than concatenating and printing them. This lecture covers the other ways that strings can be represented in your Python code and why you would use these alternate forms.
There are lots of useful and common things you'll want to do with strings, but you don't have to write the code to do them yourself. Python comes with string methods for many basic operations.
String concatenation can become a mess of characters that makes your code hard to read. String formatting offers a simpler way to put strings together.
Once your programs are finished, you won't always want to launch IDLE every time you want to run them. This lecture covers how to create shortcuts for your programs on Windows. Mac and Linux are covered in the course notes.
Regular expressions offer a way to not only search for text, but to search for patterns of text. This is a large step in increasing the power of your programs.
In this lesson, you learn how the pipe regex character allows you to search for one of multiple patterns.
In this lesson, you'll learn how to find repeating patterns and know the difference between regular expressions that do greedy-matching and nongreedy-matching.
While the familiar search() method returns the first match of the regex's pattern, the findall() method returns all matches of the pattern. This lesson also explores character classes: a handy shortcut for specifying alternatives in regex pattern.
The regex dot-star is a common "catch all" pattern that you can use in your regular expressions. This lesson also explores matching patterns at the start or end of a string.
Regular expressions can not only find text patterns, but can also perform fin-and-replace for text patterns. The sub() method lets us make these text substitutions.
At this point, we'll combine our knowledge of regular expressions to create a script that can pull phone numbers and email addresses out of a document.
If you're an office worker, student, administrator, or just want to become more productive with your computer, programming will allow you write code that can automate tedious tasks. This course follows the popular (and free!) book, Automate the Boring Stuff with Python.
Automate the Boring Stuff with Python was written for people who want to get up to speed writing small programs that do practical tasks as soon as possible. You don't need to know sorting algorithms or object-oriented programming, so this course skips all the computer science and concentrates on writing code that gets stuff done.
This course is for complete beginners and covers the popular Python programming language. You'll learn basic concepts as well as:
By the end of this course, you'll be able to write code that not only dramatically increases your productivity, but also be able to list this fun and creative skill on your resume.