These are the audio lectures to supplement the textbook 'Python for Everybody: Exploring Information' and its associated web site www.py4e.com. There is also a video podcast of this material.
In this lecture we learn abut how the computer processes and stores programs. We learn about the CPU, Memory, Storage and Input / Output devices are brought together to write a program.
We look at how writing programs is just another form of communication. Instead of communicating with another person, we are communicating our ideas to a computer.
We look at Python's reserved words, how we name and use variables, why we choose meaningful (mnemonic) variable names and how assignment statements function.
The most basic conditional structure is the if statement where we either execute or skip a segment of code based on the results of a logical expression (i.e. asking a question).
In this lecture we look at multi-branch if statements and the try-except concept where we can indicate a group of statements to be executed if something goes wrong with a block of statements.
We look at how we construct a loop so that it runs as long as we want it to run. We learn about iteration variables and exiting loops with the 'break' and 'continue' statements.
Loops have a beginning, middle, and end. We look ant how we construct a loop to look at a list of items one at a time so we can compute an overall maximum, minimum or average.
We continue to look at how to construct loops including how to do something special the first time through the loop. We introduce the idea of 'None' which is a way to indicate that a variable is currently empty.
We look at patterns for reading and processing the data in files. We learn how to check for nonexistent files, and how we process each line within the file.
We compare and contrast how Python lists and dictionaries are structured internally. How we use position to index lists and use keys to index dictionaries.
We look at how we can use dictionaries to count the frequencies of many things at the same time. We learn how the key and value are related in a dictionary and example the get method to retrieve values from a Python dictionary.
In this segment we bring everything together, reading a file, parsing the lines, and computing the frequencies of the words in the file. This is an important moment that pulls from everything we have learned so far.
Now we will look at the HypertextMarkup Language (HTML) that we retrieved using Python and extract links from that HTML. We are slowly building a very simple web search engine.
We look at two different ways to format data for transmission across the network including JavaScript Object Notation (JSON) and eXtended Markup Language (XML).
We look at how Python mentions objects in its documentation as well as talk about why philosophy of object-oriented programming. We explore some OOP terms like class, object, instance, method, and attribute.
We look at how use create a new class in Python and then construct a new object from that class. We also look at some of the Python objects (like strings) that we have been using all along.
We look at how we as the developers of a Python class can interact with the moment of construction and destruction of various objects created using the class.
We look at how we can make a new class by inheriting all of the attributes and methods of a parent class and then extend the new class with additional attributes and methods.
We look at how we can take the various data elements that will be modeled in an application and distribute them across several tables efficiently. We learn about the basic rules of database design.