




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





General Instructions: This question paper contains 37 questions. All questions are compulsory. However, internal choices have been provided in some questions. Attempt only one of the choices in such questions The paper is divided into 5 Sections- A, B, C, D and E. Section A consists of 21 questions (1 to 21). Each question carries 1 Mark. Section B consists of 7 questions (22 to 28). Each question carries 2 Marks. Section C consists of 3 questions (29 to 31). Each question carries 3 Marks. Section D consists of 4 questions (32 to 35). Each question carries 4 Marks. Section E consists of 2 questions (36 to 37). Each question carries 5 Marks. All programming questions are to be answered using Python Language only. In case of MCQ, text of the correct answer should also be written. SECTION – A Q No. Section-A (21 x 1 = 21 Marks) Marks
D1.update(D2) print (D1) a) {4:’Four’,5: ‘Five’} b) Method update() doesn’t exist for dictionary c) {1: “One”,2: “Two”, 3: “C”} d) {1: “One”,2: “Two”, 3: “C”,4: ‘Four’,5: ‘Five’}
Q20 and Q21 are Assertion(A) and Reason(R) based questions. Mark the correct choice as: (A) Both A and R are true and R is the correct explanation for A (B) Both A and R are true and R is not the correct explanation for A (C) A is
(a) Given is a Python string declaration: Word = "Connect Python” Write the output of: print(Word[: : 3]) (b) Write the output of the code given below: dict = {"Item": "Laptop", "Make": "LG" } dict["Price"] = 57000 dict["Make"] = "DELL" for k in dict: print(k, ‘@’, dict[k])
Q No. Section-C ( 3 x 3 = 9 Marks) Marks
finally: print("Finally block") B) What is the output of the following code? try: raise Exception("An error occurred") except Exception as e: print(e) finally: print("Finally block") Q No. SECTION E (2 X 5 = 10 Marks) Marks
************************ ALL THE BEST **************************