This symbol is used for comments in Python.
#
This structure allows programs to make decisions.
if statement
This keyword repeats code.
loop
x = 5
print(x)
5
Complete the code to print numbers:
for i in _____(5):
This operator performs multiplication.
*
This block runs when all conditions are false.
else
This loop is used when the number of repetitions is known.
for loop
num = 10
if num > 5:
print("Yes")
Yes
num = _____(input("Enter a number: "))
int
This operator checks equality between two values.
==
This keyword allows checking multiple conditions.
elif
This loop runs based on a condition.
while loop
x = 1
while x <= 3:
print(x)
x += 1
1
2
3
Complete the condition:
if num _____ 2 == 0:
%
Python commands are typed and executed here.
Python shell
This operator checks if one number is greater than another.
>
What does this print?
for i in range(1,4):
print(i)
1
2
3
if 4 > 8:
print("A")
else:
print("B")
B
Fill in the blank to stop the loop.
if i == 4:
_____
break
This command exits the Python shell.
quit()
This operator returns the remainder after division.
% (modulus)
What does this print?
for i in range(1,6):
if i % 2 == 0:
print(i)
2
4
x = 5
while x > 0:
print(x)
x -= 1
5
4
3
2
1
Fill in the blank to skip the current iteration.
if i == 5:
_____
continue