TECHSMART PYTHON UNIT 2;
PART 1 2025 QUESTIONS AND
ANSWERS
In the following code, identify the conditional that includes the elif-clause.
if x == 1:
print("X is 1")
if y == 2:
print("y is 2")
elif x == w:
print("X is w")
elif x == 5:
print("X is 5")
if x < 53:
print("x is less than 53") - ....ANSWER ...-if y == 2:
print("y is 2")
elif x == w:
...©️ 2025, ALL RIGHTS RESERVED 1
, print("X is w")
elif x == 5:
print("X is 5")
Remember that a conditional starts with an if-clause.
Which of the following is not a type of conditional clause?
if, elif, then, or else - ....ANSWER ...-then
What data type can only be represented as Yes or No and True or False? -
....ANSWER ...-boolean
Example of a boolean expression - ....ANSWER ...-a == b;
The three basic boolean operators are: - ....ANSWER ...-AND, OR, and NOT.
How many times will the following code print the statement "Print me"?
x=0
while x < 1000:
print("Print me")
x += 100 - ....ANSWER ...-10
Identify the if-clause in the following code.
if x < y:
...©️ 2025, ALL RIGHTS RESERVED 2
PART 1 2025 QUESTIONS AND
ANSWERS
In the following code, identify the conditional that includes the elif-clause.
if x == 1:
print("X is 1")
if y == 2:
print("y is 2")
elif x == w:
print("X is w")
elif x == 5:
print("X is 5")
if x < 53:
print("x is less than 53") - ....ANSWER ...-if y == 2:
print("y is 2")
elif x == w:
...©️ 2025, ALL RIGHTS RESERVED 1
, print("X is w")
elif x == 5:
print("X is 5")
Remember that a conditional starts with an if-clause.
Which of the following is not a type of conditional clause?
if, elif, then, or else - ....ANSWER ...-then
What data type can only be represented as Yes or No and True or False? -
....ANSWER ...-boolean
Example of a boolean expression - ....ANSWER ...-a == b;
The three basic boolean operators are: - ....ANSWER ...-AND, OR, and NOT.
How many times will the following code print the statement "Print me"?
x=0
while x < 1000:
print("Print me")
x += 100 - ....ANSWER ...-10
Identify the if-clause in the following code.
if x < y:
...©️ 2025, ALL RIGHTS RESERVED 2