Page 164 - C_GPT _V4 _class_7
P. 164
PERIODIC ASSESSMENT 4 (Based on chapters 9 to 11)
A. Write the output of the following Python program:
voter_age = 21
voting_age = 18
if voter_age >= voting_age:
print("Congratulations!")
print("You are eligible to vote.")
else:
print("Sorry, you are not eligible to vote yet.")
B. Write the syntax for if…elif…else statement.
C. Color the boxes as per the program.
If (box has )
then
colour it red
else
colour it yellow
D. Answer the following questions:
a. Linda's father needs a device that sounds an alarm to warn if there is a fire in the home. Which device is
he talking about?
b. Your cousin Susan wants to purchase a smart device that can automatically control the lighting of her
home. The device should be capable of saving energy and be controlled by a smartphone. Suggest a
smart device to her.
CodeGPT (Ver. 4.0)-VII
162

