2022 Python
2022 Python
288057
4
D 31761 (Pages : 2) Name.........................................
Reg. No.....................................
1
THIRD SEMESTER (CBCSS—UG) DEGREE EXAMINATION
NOVEMBER 2022
1
Common Course for B.Sc. L.R.P. (Alternate Pattern)
A 11—PYTHON PROGRAMMING
(2019 Admission onwards)
Time : Two Hours and a Half Maximum : 80 Marks
Section A
Answer all questions.
1
Each question carries 2 marks.
Maximum ceiling 25 marks.
1. Give the rules for naming an identifier in Python.
4
2. What is the purpose not in operator in Python ?
3. What is the use of eval() function in Python ?
1
4. Differentiate between input() and raw_input() functions in Python.
5. What is the difference between break and continue statements in Python ?
6. How will you create an infinite loop in Python ?
1
7. What are lambda functions ?
8. What are keyword arguments in functions ?
9. Differentiate between built-in functions and user-defined functions in Python.
10. What are sets in Python ?
11. How will you reverse a list in Python ?
12. What do you mean by Python dictionary ?
1
13. What are destructors in Python ?
14. How will you rename a file in Python ?
4
15. What is the use of import statement in Python ?
Section B
Answer all questions.
1
Each question carries 5 marks.
Maximum ceiling 35 marks.
16. List out the operator precedence in Python.
1
17. Give an account on arithmetic operators in Python.
Turn over
288057
1
288057
4
2 D 31761
1
19. Write a program to find the Least Common Multiple (LCM) of any two positive integer number.
20. Explain while loop and while loop with else case with examples.
1
21. List the function and syntax any five string formatting functions in Python.
Section C
1
24. A) Explain the salient features of Python programming language. (5 marks)
B) Describe the different ways of writing and executing of Python program. (5 marks)
4
25. Discuss the different argument passing mechanism in Python with suitable examples.
26. Write a program to find the area and perimeter of a rectangle using class and objects.
1
27. What are mutable and immutable objects in Python ? Explain any two data types in each of this
category and its associated methods with examples.
1
[2 × 10 = 20 marks]
1 41
1
288057