Page 57 - PYTHON-11
P. 57

Ans.  (a)  5
                                                           Or
                (b)  Mei5
            33.  Differentiate between list and tuple in Python.                                            [4]
           Ans.

                                      List                                           Tuple
                It is an ordered collection that can be modified after  It  is an ordered  collection  that cannot be  modified
                it is created.                                  after it is created.
                Lists are defined using square brackets [].     Tuples are defined using parentheses ().
                Lists are used when the data needs to be changed or  Tuples  are  used when the data should  remain
                updated frequently.                             constant and unchanged.
                Lists  consume more  memory  because  they  support  Tuples  consume less  memory  since  their size  and
                dynamic changes.                                content cannot change.
                Lists cannot be used as keys in dictionaries because  Tuples  can  be used  as  dictionary  keys  if  all  their
                they are mutable.                               elements are immutable.

                For example, l = [11, 22, 35]                   For example, t= (17, 82, 43)
            34.  (a)  What are the characteristics of a good algorithm.                                     [4]
                                                         Or
                (b)  Mention any four precautions to stay safe online.
           Ans.  (a)  The characteristics of a good algorithm are:
                    (i)  Precise            (ii)  Unique           (iii)  Finite           (iv)  Inputs
                    (v)  Outputs           (vi)  Feasible          (vii)  Language-independent
                                                           Or
                (b)  Precautions to stay safe online are as follows:
                    (i)  Use strong passwords                       (ii)  Avoid suspicious links
                   (iii)  Install antivirus                        (iv)  Use HTTPS websites
            35.  What is decomposition? Why is it important?                                                [4]
           Ans.  Decomposition  involves breaking down  a complex  problem  or system  into  smaller parts that are  more
               manageable and easier  to understand.  The smaller parts can then be examined and  solved, or designed
               individually, as they are simpler to work with.
                If a problem is not decomposed, it is much harder to solve. Dealing with many different stages all at once
               is much more difficult  than  breaking down  a problem into a number of smaller problems and  solving  each
               problem one at a time. Breaking down the problem into smaller parts means that each smaller problem can be
               examined in more detail.
                                                Section E (2 × 5 = 10 Marks)
            36.  Consider the given scenario and answer the questions (a) to (e).:                          [5]
                TechWorld  Pvt. Ltd.,  a software development firm, recently  faced a cybersecurity  incident.  An employee
               unknowingly downloaded an attachment from a spoofed email appearing to be from the HR department. The
               attachment installed malware that recorded keystrokes and sent sensitive information to cybercriminals. The IT
               team acted swiftly and isolated affected systems, updated antivirus software, blocked suspicious IP addresses
               and conducted an awareness training on recognizing spoofed emails.
                (a)  What type of malware was installed when the employee opened the malicious attachment, enabling the
                   attackers to secretly monitor the firm’s activity?
                (b)  What type of email attack involves using a fake sender address to trick recipients?
                (c)  What technological solution  can help detect  and quarantine  malicious  email attachments before  they
                   reach users?
                (d)  What type of software is used to detect and remove malicious programs from computers?
                (e)  What network-level action can prevent communication with known malicious IPs?


                                                           M.6
   52   53   54   55   56   57   58   59   60   61   62