Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 146 - 2610_Springdales_C-7
P. 146

    PERIODIC ASSESSMENT 4                                         (Based on chapters 8 to 10)

                  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.

                            Premium Edition-VII
                    144

| 141 142 143 144 145 146 147 148 149 150 151 |