About this lesson
Year band: 5-6, 7-8Curriculum Links Assessment
Learning map and outcomes
In this lesson, students will:
- Learn how to concatenate data for output
- Learn how to store data in variables
- Put these together to make a very basic weather application
For more on setting up and choosing a language, see Setting Up.
The following videos provide the basics for using general-purpose programming languages.
This video discusses the process of combining data together to form a coherent output.
Variables are like labelled containers for storing data. View the ‘Variables' video to learn more about how to create and use variables in your computer program.
Students may work at vastly different paces when doing general-purpose programming, and some may seem to be quicker at spotting problems than others.
Try these strategies with your students:
- Pedantic computer: Think of the computer as a really pedantic person. It usually won’t cooperate if important punctuation (syntax) is missing, if something is spelled differently in two places, or even with the wrong upper or lower case.
- Pair programming or ‘Ask three before me: Often it just takes a fresh pair of eyes to spot errors or bugs in a program. Before asking the teacher the student checks with other students.
- Trace errors: The computer always runs the program in order, line-by-line, according to the code. Study each line one-by-one and ask, ‘What does this line do?’ Consider writing down the values of variables as you go.
- Tinker: Encourage students to tinker with the code. Ask, ‘What would happen if I changed this?’ Alter a part of the code or add a new feature, predict what might happen, and run it to see. You can always put it back again if something goes wrong.
About input/ output
This video encourages users to build a simple weather application to consolidate knowledge learnt so far.
BEGIN a ← 50 Display a b ← 23 Display b c ← a + b Display c END
- Setting up online environments
- Online environments for coding in each language
- Cheat sheets listing basic commands for coding:
- Python Cheatsheet (from Grok Learning)