In this introductory lesson, learners will write and execute their first programs in Python. They will go through the basics of displaying messages, assigning values to variables, and receiving input from the keyboard.
They will familiarise themselves with an entirely different programming environment than the block-based one that they may be accustomed to. It is an environment where they will need to know by heart all of the constructs that they can use, instead of having the options laid out in front of them. It is also an environment in which errors arise if they get a single letter or symbol wrong.
One of the main goals of this lesson (and of the unit) is to support them in this transition, by providing associations with concepts that they are already familiar with and building their confidence in overcoming common obstacles.
Before doing any programming, learners will be introduced to what algorithms and programs are, and how they are different. Through this discussion, they will start to build an understanding of what it means to express instructions in a formal language, and how these instructions can eventually be executed by a machine.
- Describe what algorithms and programs are and how they differ
- Recall that a program written in a programming language needs to be translated in order to be executed by a machine
- Write simple Python programs that display messages, assign values to variables, and receive keyboard input
- Locate and correct common syntax errors