



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
add() c= print(c,end='%') (A) 12%15# (B) 15#12% (C) 12#15% (D) 12%15#
No . Section-B (7 x 2 = 14 Marks) Marks
If L contains [12,4,0,11,0,56] The indexList will have - [0,1,3,5]
What will be the output of following code? def Fun1(mylist): for i in range(len(mylist)): if mylist[i]%2==0: mylist[i]/= else: mylist[i]*= list1 =[21,20,6,7,9,18,100,50,13] Fun1(list1) print(list1)
Vedika has created a dictionary containing names and marks as key-value pairs of 5 students. Write a program, with separate user-defined functions to perform the following operations:
Q No. SECTION D (4 X 4 = 16 Marks) Marks
● Name of a country ● Population of the country ● Sample Size (Number of persons who participated in the survey in that country) ● Happy (Number of persons who accepted that they were Happy) For example, a sample record of the file may be: [‘Signiland’, 5673000, 5000, 3426] Write the following Python functions to perform the specified operations on this file: (I) Read all the data from the file in the form of a list and display all those records for which the population is more than 5000000. (II) Count the number of records in the file.
No . SECTION E (2 X 5 = 10 Marks) Marks