P1 WEEK 3 M3 - INFORMATIE TECHNOLOGIE

Week 3 lesson 1
1 / 36
next
Slide 1: Slide
InformaticaMiddelbare schoolhavoLeerjaar 4

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

time-iconLesson duration is: 90 min

Items in this lesson

Week 3 lesson 1

Slide 1 - Slide

Startklaar zitten.
STARTKLAAR!
Tellie in zakkie

Slide 2 - Slide

Startklaar zitten.
Activate prior knowledge

Slide 3 - Slide

This item has no instructions

What is a programming language?
A
A language for instructing computers.
B
A language to sing.
C
A language for cooking.
D
A language to talk to friends.

Slide 4 - Quiz

This item has no instructions

Lets Play ! 

Slide 5 - Slide

This item has no instructions

What is a Variable?
A variable is like a container that stores information in a program.
You can name it and put different types of data inside (like numbers or text).

Slide 6 - Slide

This item has no instructions

Types of Variables
Numbers: Used to store numerical values (e.g., age = 15).
Text: Used to store words or sentences (e.g., name = "Alice").
Booleans: Used to store true/false values (e.g., isStudent = true).

Slide 7 - Slide

This item has no instructions

Why Use Variables?
Variables make programs flexible by allowing data to change.
Instead of hard-coding information, you can reuse and update variables easily.

Slide 8 - Slide

This item has no instructions

How to Use a Variable

Create a variable: Give it a name and assign a value (e.g., score = 0).
Change its value as needed during the program (e.g., score = 10).

Imagine you have a game and want to keep track of the player’s points:
score = 0 # The game starts, and the player has 0 points
score is the variable. It holds the number of points.

When the player gets more points, we change the variable:
score = score + 10 # The player gets 10 points
Now the score variable is 10.







Slide 9 - Slide

This item has no instructions

LEARNING OBJECTIVES
The student can understand and apply variables in programming using the control structure.

Lets Play ! 


Slide 10 - Slide

This item has no instructions

For the teacher
The student can:
Explain what a variable is and what it is used for in a program.
Recognize and use different types of variables (such as numbers, text, and Booleans) correctly.
Create a variable, assign it a value, and change the value of the variable during program execution.
Understand how variables can help make programs flexible and efficient by storing data that can be used or changed later.

Slide 11 - Slide

This item has no instructions

Data types
In programming we talk about data types for example:
String = "1234567890-=][poiuytreADFGG" for example "Yourname"
Int = 0123456789 for example 85
Boolean = true or false for example True
A boolean should not go together with a string
In the real world we actually also have a kind of data types for example the picture below. It is impossible to be a dog and a bear together because they are built differently

Slide 12 - Slide

This item has no instructions

A variable
A piece of space in the computer's memory that you or the computer can change
below is a variable created with the datatype string
var name = "Elif"
In the memory is the variable name created. In that memory we have stored "Elif"



Slide 13 - Slide

This item has no instructions

A variable
var name
var isTeacher
var age
Change variable

name = "elif"
isTeacher = true
age = 39
Now what are the new values ​​of the variables? Write them down on a piece of paper

Slide 14 - Slide

This item has no instructions

what was your answer

Slide 15 - Mind map

This item has no instructions

A variable
naam
isDocent
leeftijd
Change variable
name = name + "el'if"
age = age + 39
Now what are the new values ​​of the variables?
Write them down on a piece of paper

Slide 16 - Slide

This item has no instructions

what was your answer

Slide 17 - Mind map

This item has no instructions

Creating assignments



Quizlet

https://quizlet.com/324147133/variables-computer-science-flash-cards/

Slide 18 - Slide

This item has no instructions

I now know what a data type is and how to create a variable
Ja
Deels
Nee

Slide 19 - Poll

This item has no instructions

I now know how to use a control structure
Ja
Deels
Nee

Slide 20 - Poll

This item has no instructions

Can you write some examples of data types and tell what data type it is?

Slide 21 - Open question

This item has no instructions

Can you make a variable to store an age. Also use a control structure. if your age is older than 18 then you are allowed to go to the horror movie otherwise not. use console.log to state "yes to horror movie" or "not to horror movie"

Slide 22 - Open question

This item has no instructions

Summary
- Review in class

Slide 23 - Slide

This item has no instructions

Week 3 les 2

Slide 24 - Slide

Startklaar zitten.
STARTKLAAR!
Tellie in zakkie

Slide 25 - Slide

Startklaar zitten.
Voorkennis activeren

Slide 26 - Slide

This item has no instructions

create a variable to store the car color. if the color is white then console.log("2x per week wash ") else console.log("1 x per week wash")

Slide 27 - Open question

This item has no instructions

Learning objectives
The student can use a for loop in a program to perform repetitive tasks.

Slide 28 - Slide

This item has no instructions

For the teacher
The student can:
Explain what a for-loop is and what it is used for in a program.
Write a for-loop to repeat a task multiple times, such as printing a series of numbers or repeating a text.
Understand how the structure of a for-loop works, including the initial value, the condition and the step size (increment).
Apply a for-loop in your own code to solve repetitive tasks, such as iterating through a list or performing a calculation multiple times.

Slide 29 - Slide

This item has no instructions

Instructions to the computer
ga naar https://www.programiz.com/javascript/online-compiler/

type the following over




Slide 30 - Slide

This item has no instructions

We can do this more easily
Answer the following questions and write them down on a piece of paper
What do you notice about the structure of the commands you entered?
Can you recognize a pattern in the code?
Do you think you can automate this process? How would you do that?

Slide 31 - Slide

This item has no instructions

Write your answer below

Slide 32 - Open question

This item has no instructions

Now with a for loop
ga weer naar https://www.programiz.com/javascript/online-compiler/

Delete your old code and rewrite the code below.

Slide 33 - Slide

This item has no instructions

Complete the assignment
Look at the assignment in teams
period 1 week 3 assignment 4/6

Slide 34 - Slide

This item has no instructions

Write a forloop where your name is printed 10 times on the screen?

Slide 35 - Open question

This item has no instructions

Summary
Review in class

Slide 36 - Slide

This item has no instructions