CBSE CLASS XI INFORMATICS PRACTICES SAMPLE PAPER-1

SECTION – A (1X21=21)

Q1 Which of the following is/are invalid identifiers?

a) break                       b) total_marks            c) 2value                      d) name$

Q2 Which of the following is/are valid operators in Python?

a) *=    b) ==    c) not   d) ><

Q3 If x = False and y = True then (x or y and x) evaluates to:

a) True                         b) False                        c) True and False                     d) None of these

Q4 Python supports object-oriented programming. (True/False)

Q5 Evaluate the expression:    3 + 5 * 2 ** 2 – 18 % 4             a) 19                b) 21    c) 23    d) 17

Q6 Which SQL clause is used to filter records?

a) Select          b) Where         c) Order By      d) Group By

Q7 State True or False:            Tuple is a mutable data type.

Q8 Which of the following is/are invalid dictionary declaration?

a) D = {}           b) D = dict()                 c) D = {[1,2]:10}           d) D = {‘x’:10, 20:’y’}

Q9 Which function returns all values of a dictionary?

a) value()         b) values()       c) VALUES()      d) get()

Q10 What will be the output of the following?

L = [5, 10, 15]

print(L[1] – L[-1])

print(L * 2)

Q11 Which function removes an element from a list?

a) append()      b) pop()           c) extend()       d) add()

Q12 Which of the following is/are valid literal in Python?

a) 45                b) “hello”                     c) 0.56             d) 07

Q13 Which is immutable data type in Python?a) list             b) set               c) tuple            d) dictionary

Q14 Give output of the following code:

A = 50

if A < 100:

  print(A + 10)

else:

  print(A – 10)

A = A * 2

print(A)

Q15 Which statement is correct?      

A) not operator checks membership              B) in operator checks membership

C) in compares values                                     D) in assigns value

Q16 State True or False:          reverse() method reverses the original list.

Q17 A table can have multiple ______ keys.

a) Primary                   b) Candidate               c) Foreign                    d) Both b and c

Q18 If  my_dict = {‘pen’:5, ‘pencil’:10, ‘eraser’:3}                  Which statement will not give error?

a) my_dict + {‘sharpener’:2}   b) my_dict[‘pen’] = 8               c) print(my_dict[‘Pen’])           d) my_dict – {‘pen’:5}

Q19 If list = [2,4,6,8], what is list.index(6)?

a) 3                  b) 2                  c) 1                  d) error

ASSERTION AND REASONING

(a) Both A and R are true and R is correct explanation

(b) Both A and R are true but R is not correct explanation

(c) A is True but R is False

(d) A is False but R is True

Q20     Assertion (A): List is an ordered collection.    Reason (R): List elements are indexed.

Q21     Assertion (A): UPDATE command modifies records in SQL.  

Reason (R): UPDATE is a DML command.

SECTION – B (7 × 2 = 14 Marks)

Q22 Differentiate between DELETE and DROP command with example.  OR

Differentiate between Primary Key and Foreign Key.

Q23 a) Define Identifier in Python with example.

b) What is runtime error? Give example.

Q24 Write a program to create a NumPy array using tuple and display it.

Q25 Given the following list:  L = [25, 18, 32, 41, 56, 63, 72, 89, 90, 100]

Write Python statements to produce the following outputs: a) L[1::2]          b) L[-2::-3]

OR

If L1 = [5, 10, 5, 20, 5, 30, 40, 5, 50, 5] (Answer using built-in functions only)

A) Write a statement to count occurrences of element 5 in L1.

B) Write a statement to remove the first occurrence of 5 from L1.

Q26 a) Consider table STUDENT with following attributes:

rollnoadharnonameclasssection
101234567890123Amit SharmaXIA
102345678901234Riya GuptaXIA
103456789012345Karan MehtaXIB
104567890123456Neha SinghXIB

Identify Primary Key and Candidate Keys.

b) Identify which SQL query is correct:

i) delete * from student where rollno > 10;

ii) delete from student where rollno > 10;

Q27 Rewrite the following code after removing syntactical errors and underline the corrections made:

A=50, B

for i in range(1,10)

     A=A+i

print a End=”$”

Q28  Write the output of the following code:

a)         d = {“Rohit”:10,”Mohan”:20}

d.update({“Riya”:30,”Rohit”:50,”rohit”:70})

print(d)

b)         D={‘Apr’:30,’May’:31,’Jun’:30}

print(‘May’ in D)

print(31 in D.values())

OR

FIND THE OUTPUT

D={ 5:100, 6:200, 7:300, 8:400 }

del D[7]

print(len(D))

print(list(D.keys()))

D[D[5]]=500

print(D)

D[6]-=50

print(D)

SECTION – C (4 × 3 = 12 Marks)

Q29  a) Write SQL query to create table BOOKS:

Field NameData TypeSize
BIDInteger
BNAMEChar30
AUTHORVarchar40
PRICEFloat(6,2)
PDATEDate

b) Insert record:

(201, ‘Python Basics’, ‘ABC Sharma’, 450.50, ‘2022-07-15’)

Q30 Write Python statements to perform operations on dictionary MARKS:

MARKS = {“Amit”: 70, “Riya”: 85}

a) Add key “Neha” with value 90       

b) Increase value of “Amit” by 5

c) Display dictionary items as list of tuples

OR

Write Python statements to perform operations on dictionary STUD:

STUD = {“Math”: 78, “Physics”: 88, “Chemistry”: 91}

a) Add “Biology” subject with marks 80

b) Display all values of the dictionary

c) Remove key “Physics”

Q31 Write output of following SQL statements:

a) Select instr(“Programming”,”g”)

b) Select trim(” HELLO WORLD “)

c) Select substring(“Database System”, 5,6)

Q32 a) Define pop() and sort() functions of list with example.

b) Write output:

A = [5, 15, 25, 35, 45]

print(A[0:4:2])

A = A[::-1]

print(A)

OR

a) Differentiate between extend() and append() with example

b) Find the Output:

num = [3,6,9,12,15]

print(num[3:0:-1])

num = num[1::2]

print(num)

SECTION – D (2 × 4 = 8 Marks)

Q33:- Given Table: TRAINING

TIDTNAMEFEESTARTDATETRAINERID
TR1Python100002021-05-12301
TR2Java120002022-02-18NULL
TR3AI150002021-09-25302
TR4ML140002022-04-10301

Write outputs of queries:

a) SELECT TID, DAY(STARTDATE) FROM TRAINING;

b) SELECT TRAINERID, LEFT(TNAME,3) FROM TRAINING WHERE TRAINERID IS NOT NULL;

c) SELECT TNAME, MONTH(STARTDATE) FROM TRAINING WHERE FEE > 11000;

d) SELECT TNAME, FEE FROM TRAINING WHERE FEE BETWEEN 12000 AND 15000;

Q34 a) Write Python program to create list of 15 integers and find smallest even number.

b) Create dictionary of 6 subjects and marks. Display subjects with marks less than 40.

OR

a) Input 8 numbers and count how many are prime.

b) Create dictionary of 5 employee IDs and salaries. Display highest salary.

SECTION – E (3 × 5 = 15 Marks)

Q35 Given Table: STAFF

SIDSNAMEDEPTCITYSALARYJOIN_DATE
S101ArunHRDelhi400002009-03-15
S102MeenaITMumbai650002011-08-10
S103RajSalesPune500002005-02-20
S104TinaITDelhi750002003-10-05
S105VivekFinanceMumbai480002015-06-12

Write SQL queries:

  1. Display SNAME and CITY where city is Delhi.
  2. Display SNAME who joined in 2011.
  3. Display names having exactly 4 characters.
  4. Display employees whose salary > 60000 OR join date before ‘2005-01-01’.
  5. Display last 2 characters of DEPT.

Q36 (a) Write the SQL queries:

i) Show all databases of your system    ii) Drop table CUSTOMER from the database test

b) Python program: Create dictionary of 5 sports and players. Display sports where player name starts with ‘A’.

Q37  a) WAP to input 8 integers and replace multiples of 3 with their square.

b) Create dictionary of 8 product IDs and prices. Input product ID and display its price if exists.

OR

a) Input 10 numbers and find sum of numbers less than 50.

b) Create dictionary of 6 students and marks. Display average marks.

error: Content is protected !!
Scroll to Top