Page 46 - ipp11
P. 46

25.  (a)  What are the rules and conventions for writing Python programs?                       [2]
                                                           Or
                (b)  What is Augmented Reality?
           Ans.  (a)  The rules and conventions for writing Python programs are:
                    1.  Statement termination
                    2.  Clarity and simplification of expression
                    3.  Simplicity of instructions
                    4.  Maximum line length
                    5.  Lines and indentation
                    6.  Avoiding multiple statements in one line
                                                           Or
                (b)  Augmented Reality (AR) is  an  experience where  virtual  objects  are superimposed  onto  the real-world
                   environment via smartphones, tablets, heads-up displays or AR glasses.
            26.  How is a function defined in Python? Give an example.                                      [2]
           Ans.  A user-defined function in Python is defined by using the def keyword.
                For example,
                     def welcome():
                           print("Welcome to the world of Programming")
                     welcome()
            27.  Identify the DDL and DML SQL commands from the given commands below.                       [2]
               ALTER TABLE, INSERT INTO, DELETE, DROP, DESCRIBE, UPDATE, CREATE.
           Ans.  DDL—ALTER TABLE, DROP, DESCRIBE, CREATE
               DML—INSERT INTO, DELETE, UPDATE
            28.  (a)  A school  maintains a table, Faculty, which  stores details  of  the faculty members.  The table consists  of
                   5  columns  (Faculty_ID, Faculty_Name,  Designation,  Department,  Age)  and 30  rows,  where  each  row
                   represents a faculty member’s record. Two more records are then added to the Faculty table.   [2]
                    Based on this information, answer the following:
                    (i)  What is the degree of the Faculty table?
                    (ii)  What is the cardinality of the Faculty table?
                                                           Or
                (b)  A  hostel maintains a database of students with attributes like Adm_No,  Stu_Name,  Hostel_ID, Course,
                   Mobile_No and DOA. Each student is assigned a unique Adm_No and their Hostel_ID and Mobile_No are
                   also unique.
                    Based on this information, answer the following:
                    (i)  Identify the Primary Key for this table.
                    (ii)  List the possible Candidate Keys and justify them.
           Ans.  (a)   (i)  The degree of Faculty table is 5.
                    (ii)  The cardinality of Faculty table is 32.
                                                           Or
                (b)  (i)   Primary key—Hostel_ID
                    (ii)  Candidate keys—Adm_No, Hostel_ID, Mobile_No as they are unique.


                                                 Section C (3 × 3 = 9 Marks)
            29.  Identify the following:                                                                    [3]
                (a)  This key is a field in one table that refers to the primary key in another table.
                (b)  This is a key that can uniquely identify a record but is not chosen as the primary key.
                (c)  These are fields in a table that are unique and eligible to become a primary key.
           Ans.  (a)  Foreign Key
                (b)  Alternate Key
                (c)  Candidate Key

                                                       M.16
   41   42   43   44   45   46   47   48   49   50   51