Small basic lesson 3

Do now -Identify the names
of the variables in these programs
1 / 14
next
Slide 1: Open question
ComputingLower Secondary (Key Stage 3)

This lesson contains 14 slides, with interactive quizzes and text slides.

time-iconLesson duration is: 50 min

Items in this lesson

Do now -Identify the names
of the variables in these programs

Slide 1 - Open question

Do now activity should take 3 mins for students to answer after accessing lessonup. 

Extension task allows students to develop their typing skills which will be useful when we move to text based languages. 
Do Now answer

Slide 2 - Slide

This item has no instructions

Lesson objectives 

Conquer: Use variables to store values within code.
 
Aspire Higher: Create conditional statements using variables







 
 
Aspire: Create a set of loops to make a program more efficient.

Slide 3 - Slide

This item has no instructions

Slide 4 - Slide

This item has no instructions

What is the best variable name to store a users favorite drink.
A
Drink = Coke
B
Food = Coke
C
Variable = Coke`
D
Data = Coke

Slide 5 - Quiz

This item has no instructions

What is the purpose of this line of code?

textwindow.read
A
Writes text to screen
B
Saves information
C
Allows the user to enter information
D
Makes the background see through.

Slide 6 - Quiz

This item has no instructions

A variable is a method of ....
A
Writing text to screen.
B
Storing information
C
Running you program
D
Searching for Bugs

Slide 7 - Quiz

This item has no instructions

If Statements
Today we are going to look at a new programming method called if Statements. 

If statements use variables and information users enter to make decisions. 

Slide 8 - Slide

This item has no instructions

If statements
We can program the computer to change how it responds using information we give it.

Here the response we have changes based on the answer to the question "Is it raining?"

Slide 9 - Slide

This item has no instructions

Shape drawing program
We are going to create a program that will draw a shape that the user asks for.

Slide 10 - Slide

Copy paste this code then demo after students have completed this slide. 
TextWindow.WriteLine("What is your shape?")
answer = TextWindow.Read()
if answer = "Rectangle" then
    Turtle.Move(100)
    Turtle.Turn(90)
    Turtle.Move(250)
    Turtle.Turn(90)
    Turtle.Move(100)
    Turtle.Turn(90)
    Turtle.Move(250)
    Turtle.Turn(90)
else
    TextWindow.WriteLine("I dont understand what you said?")
EndIf
Shape Drawing Program
1. Shape selected at start of program and added to variable called "Shape".
2. If shape selected is rectangle run code to draw a rectangle.
Must haves
1. Variable name must match.
2. Code in IF statement needs indentation (space).
3. EndIf to show code in IF statement completed.

Slide 11 - Slide

This item has no instructions

Slide 12 - Slide

This item has no instructions

Extension 
Complete 2 additional shapes Hexagon and 

Slide 13 - Slide

This item has no instructions

Slide 14 - Mind map

This item has no instructions