P1 WEEK 3 M3 - INFORMATIE TECHNOLOGIE

Week 3 lesson 1
1 / 36
volgende
Slide 1: Tekstslide
InformaticaMiddelbare schoolhavoLeerjaar 4

In deze les zitten 36 slides, met interactieve quizzen en tekstslides.

time-iconLesduur is: 90 min

Onderdelen in deze les

Week 3 lesson 1

Slide 1 - Tekstslide

Startklaar zitten.
STARTKLAAR!
Tellie in zakkie

Slide 2 - Tekstslide

Startklaar zitten.
Activate prior knowledge

Slide 3 - Tekstslide

Deze slide heeft geen instructies

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 - Quizvraag

Deze slide heeft geen instructies

Lets Play ! 

Slide 5 - Tekstslide

Deze slide heeft geen instructies

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 - Tekstslide

Deze slide heeft geen instructies

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 - Tekstslide

Deze slide heeft geen instructies

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 - Tekstslide

Deze slide heeft geen instructies

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 - Tekstslide

Deze slide heeft geen instructies

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

Lets Play ! 


Slide 10 - Tekstslide

Deze slide heeft geen instructies

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 - Tekstslide

Deze slide heeft geen instructies

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 - Tekstslide

Deze slide heeft geen instructies

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 - Tekstslide

Deze slide heeft geen instructies

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 - Tekstslide

Deze slide heeft geen instructies

what was your answer

Slide 15 - Woordweb

Deze slide heeft geen instructies

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 - Tekstslide

Deze slide heeft geen instructies

what was your answer

Slide 17 - Woordweb

Deze slide heeft geen instructies

Creating assignments



Quizlet

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

Slide 18 - Tekstslide

Deze slide heeft geen instructies

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

Slide 19 - Poll

Deze slide heeft geen instructies

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

Slide 20 - Poll

Deze slide heeft geen instructies

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

Slide 21 - Open vraag

Deze slide heeft geen instructies

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 vraag

Deze slide heeft geen instructies

Summary
- Review in class

Slide 23 - Tekstslide

Deze slide heeft geen instructies

Week 3 les 2

Slide 24 - Tekstslide

Startklaar zitten.
STARTKLAAR!
Tellie in zakkie

Slide 25 - Tekstslide

Startklaar zitten.
Voorkennis activeren

Slide 26 - Tekstslide

Deze slide heeft geen instructies

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 vraag

Deze slide heeft geen instructies

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

Slide 28 - Tekstslide

Deze slide heeft geen instructies

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 - Tekstslide

Deze slide heeft geen instructies

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

type the following over




Slide 30 - Tekstslide

Deze slide heeft geen instructies

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 - Tekstslide

Deze slide heeft geen instructies

Write your answer below

Slide 32 - Open vraag

Deze slide heeft geen instructies

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 - Tekstslide

Deze slide heeft geen instructies

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

Slide 34 - Tekstslide

Deze slide heeft geen instructies

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

Slide 35 - Open vraag

Deze slide heeft geen instructies

Summary
Review in class

Slide 36 - Tekstslide

Deze slide heeft geen instructies