Wat is LessonUp
Zoeken
Kanalen
Inloggen
Registreren
‹
Terug naar zoeken
Python Lesson 5 - Recall
Python
Lesson 5 - Recap
1 / 27
volgende
Slide 1:
Tekstslide
Computing
Lower Secondary (Key Stage 3)
In deze les zitten
27 slides
, met
interactieve quizzen
en
tekstslides
.
Lesduur is:
50 min
Start les
Bewaar
Deel
Printen
Onderdelen in deze les
Python
Lesson 5 - Recap
Slide 1 - Tekstslide
List 4 python commands words.
1 example is print
Slide 2 - Woordweb
So far
We have covered
Print
Variables
If statements
Loops
Slide 3 - Tekstslide
Variables
Variables can store
Text
Numbers
Decimals
True or false
Slide 4 - Tekstslide
Recall Quiz
Try these questions on things we have covered over the past few lessons.
Slide 5 - Tekstslide
Code that runs one line after another is known as coding in...
A
Sequence
B
Selection
C
Iteration
D
Recursion
Slide 6 - Quizvraag
Code that repeats/loops is known as coding in...
A
Sequence
B
Selection
C
Iteration
D
Recursion
Slide 7 - Quizvraag
Code that only runs when a condition is met is known as coding in...
A
Sequence
B
Selection
C
Iteration
D
Recursion
Slide 8 - Quizvraag
An example of a loop in python would be:
A
print("this")
B
while x > 0 :
C
if x == 0 :
D
name = input("-->")
Slide 9 - Quizvraag
A value that is used by the program and can change is known as a...
A
Loop
B
If statement
C
function
D
variable
Slide 10 - Quizvraag
Which symbol will check is two values are the same in a while condition?
A
!=
B
==
C
=
D
"="
Slide 11 - Quizvraag
Refresh
Time to refresh those skills
Slide 12 - Tekstslide
Outputs
Used to output messages to the screen
In Python we use
print
print
(
"hello world"
)
Slide 13 - Tekstslide
create.withcode.uk
Slide 14 - Link
Variables
An area in memory used to store a value the program will use.
The value is likely to change
Here are some examples in Python
name =
"Dave"
- Text
health =
100
- Integer
Player_dead =
False
- Boolean (True/False)
Slide 15 - Tekstslide
Inputs
We often use variables to store inputs from the user
In Python we use
input
input
(
"Question the user will see as a prompt"
)
So to store a name we would use:
name =
input
(
"What is your name ? --> "
)
Slide 16 - Tekstslide
filmpref = input("What kind of films do you like? ")
Label the correct parts of the code with the symbols.
Click the icon for more information
This the the variable name given to a piece of information
This will allow the user to enter information that will be saved to the variable.
This is a string, we place a question inside so the user knows which information to enter.
Slide 17 - Sleepvraag
create.withcode.uk
Slide 18 - Link
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 19 - Sleepvraag
IF/ELIF/ELSE
When we need to make a decision in a program we use a selection statement.
In Python we use
if elif
and
else
Let's look at some coded examples...
Slide 20 - Tekstslide
create.withcode.uk
Slide 21 - Link
Now Try Yourself
Slide 22 - Tekstslide
create.withcode.uk
Slide 23 - Link
In python you must write IF, ELIF and ELSE in capital letters
A
TRUE
B
FALSE
Slide 24 - Quizvraag
After every if, elif and else statement you put ...
A
;
B
}
C
:
D
#
Slide 25 - Quizvraag
an if statement must always have an else component
A
True
B
False
Slide 26 - Quizvraag
Which of the following if statements would cause an error
A
if name != "Fred":
B
if password == guess:
C
if name = "Bobby":
D
if age >= 18 :
Slide 27 - Quizvraag
Meer lessen zoals deze
Python Lesson 5 - Recall
September 2023
- Les met
27 slides
Computing
Lower Secondary (Key Stage 3)
Y8 Python - Low Ability - If Elif JM
Juni 2023
- Les met
40 slides
Computing
Lower Secondary (Key Stage 3)
Y8 Python
Juli 2022
- Les met
30 slides
Computing
Lower Secondary (Key Stage 3)
Y8 Python
Juni 2022
- Les met
38 slides
Computing
Lower Secondary (Key Stage 3)
Python Development Lesson 1
April 2023
- Les met
28 slides
LessonUp
Lower Secondary (Key Stage 3)
Python Development Lesson 1 - JM Lesson Obs
Mei 2023
- Les met
35 slides
LessonUp
Lower Secondary (Key Stage 3)
Python Development Lesson 1
9 dagen geleden
- Les met
28 slides
LessonUp
Lower Secondary (Key Stage 3)
Python lesson 4
September 2023
- Les met
18 slides
Computing
Lower Secondary (Key Stage 3)