0% found this document useful (0 votes)
13 views5 pages

Sample 3

This document is a sample paper for Class 11 Informatics Practices, consisting of multiple-choice questions, coding exercises, and SQL queries. It covers topics such as lists, dictionaries, database concepts, and SQL commands. The paper is structured into sections with a total of 70 marks and a duration of 3 hours.

Uploaded by

sreshtanitin09
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views5 pages

Sample 3

This document is a sample paper for Class 11 Informatics Practices, consisting of multiple-choice questions, coding exercises, and SQL queries. It covers topics such as lists, dictionaries, database concepts, and SQL commands. The paper is structured into sections with a total of 70 marks and a duration of 3 hours.

Uploaded by

sreshtanitin09
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Sample Paper -3

INFORMATICS PRACTICES (065) CLASS


11
M. Marks- 70 Time- 3Hrs

1. Choose the correct answer – 20


(i) Which of the following will create an empty list-L?
(A)L={} (B)L[ ] (C)L=[ ] (D)L={ ]

(ii) Keys of a dictionary must be:


(A) Similar (B) Unique (C) Can be similar or unique these (D)All of

(iii)To create an empty dictionary –d1, we use the statement as:


(A) d1={} (B)d1=[ ] (C)d1=() (D)d1={ )

(iv) Consider the following:


List1=[‘S’,’P’,’S’,’GHY’] The
length of the above list is :
(A) 6 (B)5 (C)4 (D)None of these

(v) Consider the following list:


list1 =['Red','Green','Blue','Cyan','Magenta','Yellow','Black'] print(list1[1:6:2])
The out put is-
(A)['Red', 'Blue', 'Magenta'] (B)['Green', 'Cyan', 'Yellow']
(C)['Green', 'Cyan', 'Yellow',’Black’] (D)['Red', 'Blue', 'Magenta',’Black’]

(vi) Write the output of the following code : L=[1,2,3,4,5,[6,7,8]]


print(L[5])
(A) [6, 7, 8] (B) 6, 7, 8 (C) Error (D) 6

(vii) . Write the output of the following code :


L=[‘w’,’e’,’l’,’c’,’o’,’m’,’e’] print(len(L))
(A) 7 (B) 8 (C) 9 (D) None of the above

(viii) Which of the following will return the last element of a list L with 6 elements?
(A) L(6) (B)L[5] (C) L[6] (D)L[-6]

(ix) if L=[1,2,3] then print(L*2 ),result will be-


(A)[1,2,3]*2 (B) [1,2,3,1,2,3] (C)[1,1,2,2,3,3] (D) [3,2,1,1,2,3]
(x) If L1=[1,3,5] and L2=[2,4,6,] the print(L1+L2) result will be-
(A)[1,2,3,4,5,6] (B)[1,3,5,2,4,6] (C)[3,7,11] (D) none of these

(xi) Number of attributes in a relation is called__________


(A) size (B)degree (C) cardinality (D)weight

(xii) The term __________is used to refer to a row .


(A)Attribute (B) Tuple (C)Filed (D) Instance

(xiii)________is a field in a database table (or a combination of fields ) that has a unique value.
(A) A foreign key (B) A primary key (C)An identifier (D)A candidate key

(xiv)How do you select only one column ‘Name’ from a table named ‘Employee’?
(A) Select {all] from Employee; (B) Select ‘Name’ from Employee; (C) Select Name from
Employee; (D) Select from Employee Name;

(xv)Following which command is used to delete a database in MySQL?


(A)DELETE (B)DROP (C)DESC (D)REMOVE

(xvi)How would you display all those rows from a table named “Friends’ where the value of the
column ‘Hobbies’ is not ‘Swimming’?
(A) select all from Friends where hobbies is ‘Swimming’;
(B) select * from Friends where hobbies != ‘Swimming’;
(C) select all from Friends where hobbies is not ‘Swimming’;
(D) (D) select * from Friends where hobbies is <>‘Swimming’;

(xvii) How do you select all the rows from a table named ‘Student’ where the value of the column
‘FName’ starts with ‘K’?
(A) select * from Student where FName like ‘K___’;
(B) select * from Student where FName = ‘K’;
(C) select * from Student where FName like ‘K%’;
(D) (D) select * from Student where FName like ‘%K’;

(xviii) The data types CHAR(n) and VARCHAR(n) are used to create_______ and
_______types of string /text fields in a database,
(A) Fixed, equal (B) Equal, variable (C) Fixed, variable (D) Variable ,equal

(xix) In the given query which keyword has to be inserted?


insert into employee __________(1002,’Kamal’,2000);
(A) table (B) values (C) value (d) field
(xx) Which operator performs pattern matching?
(A) Between (B) Like (C) Is (D) In

2. (a) Consider the following list-List1=[100,200,300,600,500,600,700,800,900,600,800]


Write commands for the following: 5
(i) Add 1000 at last
(ii)Insert 4 at third position
(iii)Sort the elements of the list
(iv)Count how many times 600 is available
(v)Delete all elements from 3rdto 9thposition
(vi)Delete 800 from the list
(vii)Search the position of 700 in the list
(viii)Find the maximum value of the list
(ix)Find the length of the list
(x)Delete all the elements of the list

(b)Write the outputs:- 2


Mlist = [‘I’,’N’,’D’,’I’,’A’,’N’]
print(Mlist.remove('l')) print(Mlist.pop(3))
print(Mlist.pop(-3)) print(Mlist.index(‘e’))
(c) Suppose Dic1={100:’South’,200:’Point’,300:’School’}
Dic2={‘1st’:’GHY’,’2nd’=’GHY’}
Write the output of the following code: 3
(i) print(Dic1.items())
(ii) print(Dic2.keys())
(ii) print(Dic1.values())
(iv) print(Dic1.update(Dic2))
(v) print(len(Dic2)) (vi) Dic2.clear()
print(Dic2)

3. (i) What is DBMS? Give examples. 2

(ii) Define the terms Degree and Cardinality of table with example. 2

(iii) What is NULL value? Explain with an example. 2

(iv) Name the SQL command used to- 4


(a) Physically delete a table from a database.
(b) Display the structure of a table.
(c) To create a database.
(d) Display the table data in descending order.
(v) Define-Primary Key, Alternate Key, Candidate Key, DDL, DML, Distinct clause 6 (vi)
Create a table -STUDENT with following structure and Insert at least four rows into it. 4

Field Name Data Type/Size


Roll Integer
Name Varchar/15
DOB Date
Address Varchar/20
Sex Char/1
Fee Decimal(8,2)

4. Consider the following table- Employee


EmpNo EName DOJ Job Salary Gender
101 Raj Kumar 1998-08-17 Clerk 34000.00 M
102 Bina Rai 1997-11-24 Manager 75000.99 F
103 Amir Khan 1991-02-27 Salesman 30000.00 M
104 Kuldeep Dutta 1997-01-23` Salesman 28999.99 M
105 Jatin jain 1998-12-31 Accountant 55000.00 M
106 Mita Singh 2001-01-01 Clerk 27000.00 F
107 Vimal Jain 2001-10-31 Manager 85000.00 M
(i)Write SQL for the following- 15×1

To display the details of all employees.


a) To display Employee names,DOJ and salaries for all employees.
b) To display unique (distinct) jobs available in the table.
c) To display all jobs available in the table whose salary is 30000.00.
d) To display details of all female employee who are manager..
e) To display Employee names ,Jobs and salaries for all employees whose salary is less than
30000.00 and they are male
f) To display Employee names,date of join for all female employees.
g) To display details of all Salesman who are born in the year 1997.
h) To display details of all names end with ‘a’
i) To display details of all employees whose job is ‘Salesman’ and Salary not less than 50000.00.
j) To Display details of all employees with Salary in the range 30000 to 60000.
k) To display the names and jobs of all employees whose job is either manager or accountant.
l) To display all the records in ascending order of salary.
m) To display names, jobs and salaries for all employees in descending order of DOJ.
n) To change the salary of Mita Singh to 35000.00
o) To delete the records of all employees whose salary is less than 35000.00
(ii)Write the output of the following SQL- 5×1

p) select * from employee where job=’Manager’ and salary<80000;


q) select ename from employee where ename like’M%’;
r) select ename ,job from employee where job like’%an%’;
s) select ename,doj from employee where doj between ‘1991-01-01 and ‘1992-12-31’;
t) select ename,doj , job from employee where gender=’M’ ;

You might also like