Revision

Revision
1 / 37
volgende
Slide 1: Tekstslide
Computer ScienceSecondary Education

In deze les zit 37 slide, met interactieve quiz en tekstslide.

Onderdelen in deze les

Revision

Slide 1 - Tekstslide

Deze slide heeft geen instructies

To review the concepts of Programming
I feel confident in answering questions about computer programming

Slide 2 - Tekstslide

Deze slide heeft geen instructies

What is programming?
A
The order in which we write our code.
B
The programs we use.
C
A set of instructions to complete a task.
D
The result of our program when run.

Slide 3 - Quizvraag

Deze slide heeft geen instructies

 Variable
A variable is a named storage location in a computer's memory that can hold a value. The value stored in a variable can be changed throughout the program's execution, hence the term "Variable".

Slide 4 - Tekstslide

Deze slide heeft geen instructies

What type of information can be stored in a variable?
A
Only videos
B
Only sounds
C
Only pictures
D
Numbers, text, and other types of data

Slide 5 - Quizvraag

Deze slide heeft geen instructies

Name and describe the two different type of variables.

Slide 6 - Open vraag

Deze slide heeft geen instructies

 Selection Statements
Selection allows us to make decisions in our programs. The code we use, are IF statements.
eg. IF I want to play on my PS5 THEN
I need to switch the PS5 on
Else I leave the PS5 switched off.

Slide 7 - Tekstslide

Deze slide heeft geen instructies

What does a selection statement do?

Slide 8 - Open vraag

Deze slide heeft geen instructies

Conditional statements are used to execute different code depending on whether a certain condition is true or false. They include if, else if, and else statements.

Slide 9 - Tekstslide

Explain the concept of conditional statements and show examples of how they can be used in programs.
 Conditional Statements
Conditional statements are used to execute different code depending on whether a certain condition is true or false. They include if, else if, and else statements.

Slide 10 - Tekstslide

Deze slide heeft geen instructies

 Loops
Loops are used to repeat a section of code multiple times. They include for and while loops.

Slide 11 - Tekstslide

Deze slide heeft geen instructies

Functions
Functions are used to break up a program into smaller, reusable parts. They can be called multiple times throughout the program.

Slide 12 - Tekstslide

Deze slide heeft geen instructies

Debugging
Debugging is the process of finding and fixing errors in code. It involves using tools such as the serial monitor and debuggers.

Slide 13 - Tekstslide

Deze slide heeft geen instructies

What is sequencing?
A
A set of instructions.
B
A set of instructions in order.
C
A program created by code.
D
The result of our program when run.

Slide 14 - Quizvraag

Quiz should take 3-4 mins, allow time on later questions for students to read through the code options to figure out which option is correct. 
Comparison Operators

Slide 15 - Tekstslide

Deze slide heeft geen instructies

Challenge Time!
Scenario
Age must be 18 to go into a club.
I want to go to a club, but I want to check whether I am old enough. If I am old enough, the program must say "You can go to the party" and if I am not old enough, the program must say, "You can't go to the party".

Comparison Operator you must use is -  >=

Slide 16 - Tekstslide

Deze slide heeft geen instructies

Debugging Task
Can you find out what is wrong with the code?

Click here

Slide 17 - Tekstslide

Deze slide heeft geen instructies

Answer

Slide 18 - Tekstslide

Deze slide heeft geen instructies

What is the comparison operator for not equal to?
A
!=
B
<=
C
>=
D
==

Slide 19 - Quizvraag

Deze slide heeft geen instructies

What is a loop?
A
A set of instructions to complete a task.
B
A set of instructions in order.
C
A repeated section of code.
D
The end result of your program.

Slide 20 - Quizvraag

Deze slide heeft geen instructies

Why do we use loops in your programs?
A
To make the program run faster.
B
To make the program more efficient.
C
They allow decisions to be made.
D
They put information onto the screen,

Slide 21 - Quizvraag

Deze slide heeft geen instructies

What is a conditional statement?
A
A decision in a program.
B
A section of the program that loops.
C
A set of instructions in order.
D
An error in the code.

Slide 22 - Quizvraag

Deze slide heeft geen instructies

What is debugging?
  • Debugging code refers to the process of identifying and fixing errors, bugs, or defects in a computer program that we have created.

  • An error occurs, when you have done something wrong in your program. You could have spelt something wrong or even missed out a symbol...

Slide 23 - Tekstslide

Deze slide heeft geen instructies

Task 2 - Debugging
In this task, you will need to debug the code using the error messages that create with code provide.

Click here

Slide 24 - Tekstslide

Deze slide heeft geen instructies

What is the process of checking a program for errors?
A
Error checking
B
De-bugging
C
Error finding
D
Mistake finding

Slide 25 - Quizvraag

Deze slide heeft geen instructies

What is the process of checking a program for errors?
A
Error checking
B
De-bugging
C
Error finding
D
Mistake finding

Slide 26 - Quizvraag

Deze slide heeft geen instructies

What type of information can be stored in a variable?
A
Only videos
B
Only sounds
C
Only pictures
D
Numbers, text, and other types of data

Slide 27 - Quizvraag

Deze slide heeft geen instructies

Let's take a look at the actual program...

Slide 28 - Tekstslide

Deze slide heeft geen instructies

Let's look at why the program doesn't work properly!
Click here


'Make the students aware of data type casting'. This example is altered to show them!

Slide 29 - Tekstslide

Deze slide heeft geen instructies

How if, elif and else statements can be used

Slide 30 - Tekstslide

Deze slide heeft geen instructies

What is Syntax?
  • The way we write a line of code is important, as the computer needs to recognise it.


  • If we do not use the correct symbols and spellings in our Python coding, then the computer will not be-able to run our programs.


Slide 31 - Tekstslide

Deze slide heeft geen instructies

What are conditional statements used for?
A
Breaking the code
B
Printing out all possible options
C
Making decisions based on certain conditions
D
Making the code run faster

Slide 32 - Quizvraag

Deze slide heeft geen instructies

Algorithm Efficiency
Efficiency is crucial in computer science. It involves measuring the performance and resource usage of algorithms. We will explore different measures and methods to assess efficiency.

Slide 33 - Tekstslide

Deze slide heeft geen instructies

Measuring Efficiency
Efficiency can be measured using time complexity and space complexity. Time complexity examines the time taken by an algorithm, while space complexity evaluates the amount of memory used.

Slide 34 - Tekstslide

Deze slide heeft geen instructies

 Big O Notation
Big O Notation describes the upper limit of the time complexity of an algorithm, indicating how the runtime of the algorithm grows as the size of the input data increases.
  

Slide 35 - Tekstslide

Deze slide heeft geen instructies

Why do we use Big O Notation
Used to analyse the efficiency of a search algorithm, such as demonstrating that binary search has a time complexity of O(log n).

Slide 36 - Tekstslide

Deze slide heeft geen instructies

CORRECT
CAUSE AN ERROR
print = ("Hello")
Print("Yes!")
print("this one)
name = imput("what is your name")
name = input("what is your name")
print("this text")
fav colour = "Green"
age = 10
print("Hello", name)
print("Bye",name")

Slide 37 - Sleepvraag

Deze slide heeft geen instructies