What is a variable?
A name used to store a value.
What does + do?
Addition
What keyword is used to check a condition?
if
What is a loop?
A way to repeat instructions.
I have keys but no locks. I have space but no room. What am I?
Keyboard
What value is stored in a?
a = 20
20
What does == mean?
Equal to
What is the purpose of else?
It runs when the if condition is false.
When does a while loop continue?
As long as its condition is true.
Name 3 computer devices in 5 seconds!
Any 3 valid devices
What does a = 10 mean?
The value 10 is assigned to a.
What is the difference between = and ==?
= assigns a value; == compares two values.
What will be printed?
a = 10
if a > 5:
print("Yes")
Yes
What happens when the while condition becomes false?
loop stops.
A computer can understand Python directly without anything translating/interpreting the code.
True or False
False
What happens if we write a = 20 after a = 10?
The value of a becomes 20.
What does % give?
The remainder after division
Complete the condition:
if a ___ b:
to check if a is greater than b.
>
What can cause a while loop to become infinite?
Its condition never becomes false.
I can be on or off.
I can be clicked.
You see me on your computer screen.
What am I?
A button
What is the final value of a?
a = 10
a = 25
a = 40
40
What is the output?
print(10 + 6 * 2)
22
What will this print?
a = 8
if a > 10:
print("Big")
else:
print("Small")
Small
What is the output?
a = 3
while a > 0:
print(a)
a = a - 1
3, 2, 1
🐍 + 💻 + 🧠 = ❓
Python programming