What is LessonUp
Search
Channels
AI tools
Log in
Register
‹
Return to search
Python lesson 4
Python lesson 4
1 / 19
next
Slide 1:
Slide
Computing
Lower Secondary (Key Stage 3)
This lesson contains
19 slides
, with
interactive quizzes
and
text slides
.
Lesson duration is:
50 min
Start lesson
Save
Share
Print lesson
Items in this lesson
Python lesson 4
Slide 1 - Slide
Do Now: Fix the code, paste your fixed code below
Extension:
Code
https://create.withcode.uk/python/SJd
Extension Task
https://forms.office.com/e/YS6DfuWpEt
Slide 2 - Open question
Oracy survey
Complete the following student survey
Click here
This should take you around 5 Mins
Slide 3 - Slide
Lesson 4: Python programming
Conquer:
Define the term iteration
Aspire:
Use iteration in a program to form a loop.
Slide 4 - Slide
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 5 - Drag question
Slide 6 - Slide
Label the correct parts of this code (drag them - text at the bottom)
to create an if statement that checks if the value is greater than 20
Incorrect code
Checkpoint
Slide 7 - Drag question
Label the correct parts of this code (drag them - text at the bottom)
to create an if statement that checks if the number is less than 100
Incorrect code
Checkpoint
Slide 8 - Drag question
If statement practice
Create a a program that will ask the user their favorite subject.
if enterprise is chosen say correct enterprise is the best
If PE is chosen, say we cant do that its raining
if anything else is entered, say unfortunately you didn't say enterprise.
Click here to code
Slide 9 - Slide
Looping code
Sometimes you need the computer to repeat steps until something happens (a condition being met)
In Python we can use either while or for loops
Lets look at each in turn
Slide 10 - Slide
While loops will repeat until a condition is met
Slide 11 - Slide
Loop task: ISL
Create 2 while loops in a program
1 loop will count to 100
1 loop will count down from 100
1 loop will count up in 5's to 10000
Create with code
Slide 12 - Slide
A value that is used by the program and can change is known as a...
A
constant
B
procedure
C
function
D
variable
Slide 13 - Quiz
Code that only runs when a condition is met is known as coding in...
A
Sequence
B
Selection
C
Iteration
D
Recursion
Slide 14 - Quiz
After every if, elif and else statement you put ...
A
;
B
}
C
:
D
#
Slide 15 - Quiz
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 16 - Quiz
Which symbol will check if two values are the same in a while condition?
A
!=
B
==
C
=
D
"="
Slide 17 - Quiz
What would this code do when run:
x=1
while x != 10:
print(x)
A
Count to 10 on screen
B
Count to 9 on screen
C
print the value 1 over and over forever
D
produce a syntax error
Slide 18 - Quiz
Extention task
Continue to practice your mastery of different typing skills.
Click here
Start on either beginner or intermediate.
Slide 19 - Slide
More lessons like this
Programming A Screen Turtle
December 2023
-
19 slides
Computing
Primary Education
LessonUp Inspiration
British Science Week: Coding with SCRATCH
23 days ago
-
14 slides
New lesson editor
Computing
LessonUp
Primary Education
Lower Secondary (Key Stage 3)
LessonUp UK Spotlight
Time Travelling Programmers
September 2024
-
14 slides
Computing
Primary Education
LessonUp Inspiration
Vincent’s Japanese examples
September 2023
-
20 slides
Art and design
Primary Education
Lower Secondary (Key Stage 3)
Van Gogh Museum
Lesson 2. The birth of Jesus
November 2024
-
8 slides
Religious education
Upper Secondary (Key Stage 4)
BTEC, GCSE
ATMT
Computing On Spreadsheets 1-2 Lesson Help
February 2024
-
12 slides
Computing
Primary Education
LessonUp Inspiration
Active learning techniques in LessonUp
August 2023
-
21 slides
LessonUp
Upper Secondary (Key Stage 4)
BTEC
LessonUp Academy
KS1- How Do You Feel? How Do I Feel?
August 2023
-
14 slides
British Values
Primary Education
LessonUp Inspiration