Do Now Write a sequence of instructions so the bird reaches the pig. For example move forward two times.
Do Now Write a sequence of instructions so the bird reaches the pig. For example move forward two times.
Deze slide heeft geen instructies
Block based programming
Lesson 1
Deze slide heeft geen instructies
Lesson objectives
Conquer: Understand the key programming concept of sequencing.
Aspire:Apply sequencing to solve programming problems.
Deze slide heeft geen instructies
Creating a sequence
A Sequence, is the order that commands are executed by a computer, this allows us to carry out tasks that have multiple steps.
You are going to create a sequence of instructions
Create a set of instructions to make a cup of tea.
Running code in order
Line 1 will run first
then line 2
then line 3
The instructions have to be written in the right order.
Create a set of instructions to make a cup of tea.
Be super picky with students instructions/answers.
Examples
"Put water in the kettle" where from?
"stir the tea" With what?
Make sure students are really specific with their instructions as in programs you have to be really specific.
My method
Fill the kettle
Boil the water
Add tea bag to mug
Pour boiling water into mug
Wait
Remove the teabag
Add sugar (if wanted)
Add milk (if wanted)
Be super picky with students instructions.
Examples
"Put water in the kettle" where from?
"stir the tea" With what?
Make sure students are really specific with their instructions as in programs you have to be really specific.
This example is not perfect, no specific enough.
What is sequencing?
A set of instructions
A set of instructions in order.
A program created by code.
The result of our program when run.
Deze slide heeft geen instructies
What is programming?
“Programming is how you get computers to solve problems”
Programming is the process of creating a set of instructions that tell a computer how to perform a task.
We have 2 main kinds of programming:
Deze slide heeft geen instructies
What is programming?
The order in which we write our code.
The programs we use.
A set of instructions to complete a task.
The result of our program when run.
Deze slide heeft geen instructies
Applying our skills
We will now apply our new found skills in sequencing to create some programs.
Deze slide heeft geen instructies
Lets have a go at programming some sequences.
On the first level, we want the angry bird to reach his nemesis the pig.
We need to create a sequence of instructions that make this happen
Drag the move forward into the when run box. Then click run.
This is where you will demo the level, you could use student feedback to build it.
The next slide has a set of tasks for the student to complete.
When majority of student have reach level 6, move to next slide.
Making tea
So we have the written process we would follow to make 1 cup of tea.
If this was a program we have coded, and we wanted to create 5 cups of tea we would have to repeat the instructions 5 times.
Deze slide heeft geen instructies
Our instructions would look like this
Explain this would take ages to code, this is not an efficient way of writing instructions.
For 25 cups of tea
This would take a really long time if we were writing this program, so we use a coding concept called iteration (loop).
Deze slide heeft geen instructies
Using a Loop
A loop in a computer program is set of instructions that are repeated until the loop meets a STOP condition.
A STOP condition will tell the program when it’s completed.
Deze slide heeft geen instructies
So instead of 10 lines of code, we can do it in 2.
Deze slide heeft geen instructies
Lets have a go at programming some sequences.
(ISL)
We will now use loops to help the angry bird reach the Pig.
Try to complete them with as few blocks as possible.
Limited blocks
3 quick exit ticket questions
With a just in case mastery task for typing
What is sequencing?
A set of instructions
A set of instructions in order.
A program created by code.
The result of our program when run.
Deze slide heeft geen instructies
What is a loop?
A set of instructions to complete a task.
A set of instructions in order.
A repeated section of code
The end result of your program.
Deze slide heeft geen instructies
What is programming?
The order in which we write our code.
The programs we use.
A set of instructions to complete a task.
The result of our program when run.
Deze slide heeft geen instructies
Mastery task
Continue to practice your mastery of different typing skills.
Start on either beginner or intermediate.
Deze slide heeft geen instructies