Python lesson 3

Python lesson 3
1 / 14
next
Slide 1: Slide
ComputingLower Secondary (Key Stage 3)

This lesson contains 14 slides, with interactive quizzes and text slides.

time-iconLesson duration is: 50 min
Report this lesson

Items in this lesson

Python lesson 3

Slide 1 - Slide

Do Now: Fix the code, paste your fixed code below

Extension: Create some more questions using IF statements
Code
<a href="https://create.withcode.uk/python/ZT4">https://create.withcode.uk/python/ZT4</a>

Slide 2 - Open question

Lesson 3: Python programming
Strengthening: Use conditional statements to create a calculator. 

Excelling: Use iteration in a program to form a loop. 


Slide 3 - 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 4 - Drag question

Slide 5 - Slide

MATH!!!!!!
By default all data is saved as a string


Test the code, what happens? 

Slide 6 - Slide

What happens in this calculation?

Slide 7 - Open question

Casting
When need to cast to change the type of data that the user enters. 
We add the keyword INT before the input to change it.





Slide 8 - Slide

Creating a calculator
Using casting we can now create a calculator.




Slide 9 - 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 10 - Quiz

Code that only runs when a condition is met is known as coding in...
A
Sequence
B
Selection
C
Iteration
D
Recursion

Slide 11 - Quiz

After every if, elif and else statement you put ...
A
;
B
}
C
:
D
#

Slide 12 - 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 13 - Quiz

Which symbol will check if two values are the same in a while condition?
A
!=
B
==
C
=
D
"="

Slide 14 - Quiz