Revision

Revision
1 / 37
suivant
Slide 1: Diapositive
Computer ScienceSecondary Education

Cette leçon contient 37 diapositives, avec quiz interactifs et diapositives de texte.

Éléments de cette leçon

Revision

Slide 1 - Diapositive

Cet élément n'a pas d'instructions

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

Slide 2 - Diapositive

Cet élément n'a pas d'instructions

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

Cet élément n'a pas d'instructions

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

Cet élément n'a pas d'instructions

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

Cet élément n'a pas d'instructions

Name and describe the two different type of variables.

Slide 6 - Question ouverte

Cet élément n'a pas d'instructions

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

Cet élément n'a pas d'instructions

What does a selection statement do?

Slide 8 - Question ouverte

Cet élément n'a pas d'instructions

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

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

Cet élément n'a pas d'instructions

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

Slide 11 - Diapositive

Cet élément n'a pas d'instructions

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

Slide 12 - Diapositive

Cet élément n'a pas d'instructions

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

Cet élément n'a pas d'instructions

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

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

Cet élément n'a pas d'instructions

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

Cet élément n'a pas d'instructions

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

Click here

Slide 17 - Diapositive

Cet élément n'a pas d'instructions

Answer

Slide 18 - Diapositive

Cet élément n'a pas d'instructions

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

Slide 19 - Quiz

Cet élément n'a pas d'instructions

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

Cet élément n'a pas d'instructions

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

Cet élément n'a pas d'instructions

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

Cet élément n'a pas d'instructions

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

Cet élément n'a pas d'instructions

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

Cet élément n'a pas d'instructions

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

Slide 25 - Quiz

Cet élément n'a pas d'instructions

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

Slide 26 - Quiz

Cet élément n'a pas d'instructions

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

Cet élément n'a pas d'instructions

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

Slide 28 - Diapositive

Cet élément n'a pas d'instructions

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

Cet élément n'a pas d'instructions

How if, elif and else statements can be used

Slide 30 - Diapositive

Cet élément n'a pas d'instructions

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

Cet élément n'a pas d'instructions

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

Cet élément n'a pas d'instructions

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

Cet élément n'a pas d'instructions

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

Cet élément n'a pas d'instructions

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

Cet élément n'a pas d'instructions

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

Cet élément n'a pas d'instructions

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 - Question de remorquage

Cet élément n'a pas d'instructions