
An overview of the course and its content
In this lecture we will download the software we need. There is a pdf-file in the supplemental material for this lecture that you can find here at the side. This file will give the download links you need and some links to installation instructions if needed.
We talk about the programs and the code that will be written during the course and how you can get copies of it.
Introduction to Section 2 - Computers and applications
We examine the only language the computer understands; machine language. You will see how programming has developed from writing programs using only numbers, to assembly language and the to what we use today.
How can the code we write be translated into something the computer understands? We talk about interpreters and compilers.
What is a programming language? Why are there so many of them? How to choose one to learn?
To be able to write programs we will need some tools in the form of different programs. We talk about what we need, and what these programs can offer us as programmers.
Summary of section 2
Introduction to the first concept of programming, the sequence
Now it is time to write some code. We take a first look at what this is all about.
The flow of a program is all about the sequence. But in this lecture we will also write our first real program.
Introduction to section 4 - Data and data types
A variable is one of the most useful things we will find in programming. What is it? How does it work? That is what we cover here.
A variable has a type. What does this mean? This lecture is a short introduction to the ones that follows.
We will often work with numbers. But numbers will come in different forms. What are those and why will we need to bother about it?
Life is not all about numbers. The string data type will let us use text and other types of characters in our programs.
The boolean data type is all about true and false.
Other programming languages will handle data types a bit different than Python. We will look at the biggest differences and also talk about types not found in Python.
Summary of section 4
We use operators all the time when we write programs. In this section we will take a closer look at them, group them into to different types and we will also try some of them.
What is an operator? When do we use them?
We have seen them before, but here we take a closer look on operation we can perform on numbers.
Some of the operators we used on numbers can be used on strings and some can't. We try to see what we and can't do.
We covered some operators in this section, but there are many more.
Other languages have some operators that we don't have in Python. Here we will look at some of the more frequently used operators in languages such as Java, C++ and PHP.
Summary of section 5
Sometimes we want to store more than one value in a variable, but a normal variable can only hold one value at the time. With the help of containers we can store multiple values under one single name.
What is a container? When do we use them? Here we will start our exploration of containers.
List is the most common type of container we will use in programming. Here we will see how we can use it.
When we have the need of a container we can often use a list but sometimes we need more specialized container types.
A short lecture that will address the question of a string can be considered a type of container or not.
In other languages we will find some types of containers that are not implemented in Python.
Summary section 6
Sometimes we need to repeat the same thing over and over again
Sometimes we need to repeat the same thing over and over again
Sometimes we need to repeat the same thing over and over again
Before we see how we can repeat something we will need to figure out a way to define a block of code so we know what it is that will be repeated.
Sometimes we know how many times we will need to repeat something. Here we talk about how we can do this.
We we have store a number of things in a container we might want to do something with every item. It might be advanced calculations or maybe we just want to print each item in the container. Here we will see how we can make sure that we repeat just as many times as there are items in the container.
Imagine a bowl of candies and imagine that I tell you to take as many as you like. You will repeat the steps take a candy and put it in your mouth until you are full (or sick). Here we have a condition and this condition will tell us when to stop repeating.
The syntax we use in Python for repeating will differ from most other programming languages. Here we will see what it can look like in other languages.
Summary section 7
If you are thirsty you will drink something. This is a condition. You will only drink if you are thirsty. We will use the same type of conditions in programming all the time. Here we explore how.
The if-statement is the most frequent method we will use for selections (or if you want, taking decissions).
If a condition is not met we might want to do something else.
There is one type of selection that we will not find in Python. Let us explore it.
Summary section 9
We will often group a number of tasks together with a single name and when we know all the tasks that we need to perform we can use this name for them. For example, is I ask you to take the car and drive to the mall you know all the steps needed to drive the car, I will not need to explain them to you.
Open the car door, enter the car, insert key, ...
This is what functions is about.
How do we write a function?
OK great, now I have my function but how will I use it?
If we don't want our function to do exactly the same thing every time we use we might need to send some information to it so it can do things a bit different. Here we see how this works.
My function is performing this wonderful calculation. Now I will need a way that the function can tell me the result.
Functions will look more or less the same in any language, but there are some differences.
Summary section 9
Object orientation is a common way to structure a program. In this section we will look at the most important aspects of object oriented programming.
When we write object oriented programs we will do this with the help of objects. Objects are created using classes. Here we will see how this is done.
Data and behavior are the two buildings blocks objects are made of. In this lecture we explore this.
In the previous lecture we wrote a program. In this lecture we will examine it and see how it works.
There are some differences when it comes to how different languages implement object orientation.
Summary section 10
This course will help you unlock the mysteries of programming. We will step-by-step look at the fundamental building blocks found in almost all programming languages. We will use Python as our tool, but this is not an introduction to Python, our focus is on the concepts of programming.
After this course you will have a solid foundation to learn any programming language as you will recognize everything you learned during this course.
This is a course by the author of the book Computer Programming for Absolute Beginners