Sie sind auf Seite 1von 3

POST-MIDTERM EXAMINATION

CLASS XI - INFORMATICS PRACTICES


MM:25

GENERAL INSTRUCTIONS:
1. THE QUESTION PAPER HAS TWO PARTS A AND B.
2. THERE ARE INTERNAL CHOICES BETWEEN EACH SECTION OF THE RESPECTIVE PARTS.
3. DO ANY FOUR QUESTIONS FROM SECTION II PART A
4. DO ANY Two QUESTIONS FROM SECTION I PART B

PART A
SECTION 1

1. How to find the last element of a list in Python? Assume `bikes` is the name of the list ?
a) bikes[0] b) bikes[-1] c) bikes[lpos] d) bikes[:-1]. (1)

2. How many times will it print the statement ?, for i in range(100): print(i) (1)
a) 1 b) 100 c) 0

3. Select the correct code to print :- cppbuzz-chicago (1)


a) print('cppbuzz-' + 'chicago') b) print('cppbuzz' + '-chicago')
c) print('cppbuzz' + '-' + 'chicago' ) d) All of these

4. What is the output when we execute list(“hello”)? (1)


a) [‘h’, ‘e’, ‘l’, ‘l’, ‘o’] b) [‘hello’]
c) [‘llo’] d) [‘olleh’]

5. Give one example of nested if statement. (1)

6. list1 is [3, 5, 25, 1, 3], what is min(list1) ? (1)

SECTION II

7. What is the difference between extend() and insert() method of a list ? give an example. (2)

8. else clause is available with if as well as loop construct,can you differentiate the use of else in both.
(2)
9. What is indentation and how is it related to block and body ? (2)

10. What is an infinite loop ? Give an example . (2)

11. Write a program to print the first 10 odd numbers. (2)

PART B
SECTION I
12. Write a program to implement list replication , comprehension and traversing . (3)

13. How will you convert a string to a list ? Give one example. (3)
14. Give an example of remove() , pop() and del statement of a list. (3)

SECTION II
.
15. Write a python program to generate the following output :- (5)

1
1 2
1 2 3
1 2 34

Das könnte Ihnen auch gefallen