0% found this document useful (0 votes)
31 views

XIInfo Pract pt3433

The document provides instructions for a sample paper divided into three sections: Section A contains 5 very short answer questions worth 1 mark each, Section B contains 2 short answer questions worth 2 marks each with internal choices, and Section C contains 2 long answer questions worth 4 and 6 marks respectively.

Uploaded by

moammed
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)
31 views

XIInfo Pract pt3433

The document provides instructions for a sample paper divided into three sections: Section A contains 5 very short answer questions worth 1 mark each, Section B contains 2 short answer questions worth 2 marks each with internal choices, and Section C contains 2 long answer questions worth 4 and 6 marks respectively.

Uploaded by

moammed
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/ 2

SAMPLE PAPER

_______________________________________________________________________________________________
General Instruction:
(a). Make sure to follow a sequence while writing.
(b). Paper is divided into three sections i.e. A, B and C
(c). Section A contains VERY Short Answer Type questions of 5 marks
(d). Section B contains Short Answer Type Questions of 10 marks with internal choices
(e). Section C contains Long Answer Type Questions of 10 marks

SECTION A (VERY SHORT ANSWER TYPE)-5 MARKS


Q1. Which of the following will always return a list. 1
a. max() b. sort()
c. min() d. sorted()

Q2. If L=[1,2] then L*2 return will yield 1


a. [1,2]*2 b. [1,2,2] c. [1,1,2,2] d. [1,2,1,2]
Q3. Which of the following is correct with respect to above Python Code? 1
d={‘a’:3,’b’:7}
a) a dictionary d is created.
b) a and b are the keys of dictionary d.
c) 3 and 7 are the values of dictionary d.
d) All of these
Q4 and 5 are ASSERTION AND REASONING 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 True but R is False
D) A is false but R is True

Q4. Assertion(A): Mutable type dictionaries internally store elements through immutable keys. 1
Reasoning(R): In every key: value pair, the key must be of immutable type always, to
facilitate internal mapping of elements.

Q5. Assertion(A): Any comma – separated group of values creates a list. 1


Reasoning(R): Only a group of comma-separated values or expressions enclosed in [],
creates a list
SECTION B (SHORT ANSWER TYPE QUESTIONS)- 10 MARKS
Q6. Start with the list [8,910]. Do the following using list functions. 2
a. Set the second entry b. Add 4,5 and 6 to the end of the list
(index 1) to 17
c. Remove the first entry d. Sort the list
from the list
OR

What does each of the following expressions evaluates to ? Suppose that L is the list

[‘These’,[‘are’,’a’,’few’,’words’],’that’,’we’,’will’,’use’]

a. L[1][0::2] b. ‘a’ in L[1][0]


c. L[:1]+L[1] d. L[2][2] in L[1]
f. e.
Q7. What all types of values can you store in 2
(a) dictionary-values? (b) dictionary-keys?
Q8. Predict an output of the following code: 2
L1,L2=[2,4],[2,4]
L3=list(L2)
L2[1]=5
print(L3)
OR

What will be the output produced by following code?


d1={5:’number’,’a’:’string’,(1,2):’tuple’}
print(‘Dictionary contents’)
for x in d1.keys():
print(x,:d1[x],end=’ ’)
print(d1[x]*3)
print()

Q9. What is the difference between appending a list or extending a list. 2

OR

Create a dictionary ‘ODD’ of odd numbers between 1 and 10. Where the key is the numbers
and the value is the corresponding numbers in words.

Q10. What are list slices? Mention its example. 2

SECTION C (LONG ANSWER TYPE QUESTIONS)- 10 MARKS


Q11. A) Python program to find sum of all numbers in a list. 4
[2+2]
B) Write a program to enter names of employee and their salaries as input and store
them in a dictionary.

Q12. A) Write a Python Program to Square Each Element of the List and Print List in 6
Reverse Order. [3+3]

B) Write a Python script to generate and print a dictionary that contains a number
(between 1 and n) in the form (x, x*x).
Sample Output
Enter the Limit : 5
{1: 1, 2: 4, 3: 9, 4: 16, 5: 25}.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy