0% found this document useful (0 votes)
20 views3 pages

Class 12th PT-1 (CS)

The document is a question paper for Lions Convent Hr Sec School, divided into four sections: multiple-choice questions, short answer questions, case-based study questions, and long answer questions. Each section has specific instructions and marks allocation, covering various topics related to Python programming. The paper includes questions on Python file extensions, data types, functions, and programming tasks.

Uploaded by

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

Class 12th PT-1 (CS)

The document is a question paper for Lions Convent Hr Sec School, divided into four sections: multiple-choice questions, short answer questions, case-based study questions, and long answer questions. Each section has specific instructions and marks allocation, covering various topics related to Python programming. The paper includes questions on Python file extensions, data types, functions, and programming tasks.

Uploaded by

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

Lions Convent Hr Sec School

Set – A

General Instructions:
1. All questions are compulsory.
2. The question paper is divided into four sections: A, B, C, and D.
3. Section A consists of 10 multiple-choice questions (MCQs), each carrying 1 mark.
4. Section B consists of 9 short answer questions, each carrying 2 marks.
5. Section C consists of 3 case-based study questions, each carrying 4 marks.
6. Section D consists of 2 long answer questions, each carrying 5 marks.

Section A – Multiple Choice Questions (MCQs) [1 × 10 = 10 Marks]


1. What is the correct extension of a Python file?
a) .py
b) .python
c) .pt
d) .pyt
2. Which of the following is an immutable data type in Python?
a) List
b) Dictionary
c) Tuple
d) Set
3. What will print(type(5/2)) output?
a) int
b) float
c) str
d) complex
4. Which keyword is used to define a function in Python?
a) function
b) define
c) def
d) fun
5. What does the range(5) function return?
a) [0, 1, 2, 3, 4]
b) [1, 2, 3, 4, 5]
c) [0, 1, 2, 3, 4, 5]
d) [1, 2, 3, 4]
6. What will bool([]) return?
a) True
b) False
c) None
d) Error
7. What is the output of len("Hello World")?
a) 10
b) 11
c) 12
d) 9
8. Which of the following methods is used to add an element to a list?
a) append()
b) add()
c) insert()
d) push()
9. What does list1.extend(list2) do?
a) Merges list2 into list1
b) Deletes list2
c) Creates a new list
d) None of the above
10.What will print(2 ** 3) output?
a) 5
b) 8
c) 6
d) 9

Section B – Short Answer Questions [2 × 9 = 18 Marks]


11.Define Python and mention two of its key features.
12.Explain the difference between is and == in Python.

13.What is the difference between a list and a tuple?


14.Write a Python program to check if a number is even or odd.
15.Explain the use of functions in Python.
16.What are local and global variables in Python? Give an example.
17.Explain the difference between break and continue statements in Python.

18.What is the difference between pop() and remove() in lists?


19. What is tokens? Write its types.

Section C – Case-Based Study Questions [4 × 3 = 12 Marks]


20. Case Study 1: Read the following passage and answer the given questions.
A company stores employee data using Python dictionaries. Each employee has attributes like name,
age, and salary. Answer the following: (Attempt any 4)
a) How do you add a new key-value pair to a dictionary?
b) Write a Python statement to update an employee's salary.
c) How do you delete a specific key from a dictionary?
d) Write a Python statement to check if the key 'age' exists in the dictionary.
e) What function returns all the keys of a dictionary?

21. Case Study 2: A school stores student marks in a list. Answer the following: (Attempt any 4)
a) Write a Python program to find the highest marks in a list.
b) How do you calculate the average marks of students?
c) How do you sort the marks in ascending order?
d) How do you remove duplicate marks from the list?
e) What is the output of marks[-1] in a list?

22. Case Study 4: A Python function is defined as follows: (Attempt any 4)


def mystery(x):
return x * 2

a) What will mystery(5) return?


b) Modify the function to return the cube of x.
c) What is the role of return in the function?
d) Write another function that takes two arguments and returns their sum.
e) What is the default return type of a function in Python?

Section D – Long Answer Questions [5 × 2 = 10 Marks]


23. Write a Python program to find the sum of all elements in a list.
24. Write a Python program to check if a given string is a palindrome.
OR
What is argument in terms of functions? Explain about the types of arguments.

You might also like