0% found this document useful (0 votes)
71 views6 pages

PYTHON April 2024

Uploaded by

muthupriya010162
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)
71 views6 pages

PYTHON April 2024

Uploaded by

muthupriya010162
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/ 6

(6 pages)

Reg. No. : ........................................

Code No. : 10361 E Sub. Code : AEIT 51

B.Sc. (CBCS) DEGREE EXAMINATION,


APRIL 2024.

Fifth Semester

Information Technology

Major Elective – PYTHON PROGRAMMING

(For those who joined in July 2020 only)

Time : Three hours Maximum : 75 marks

PART A — (10 × 1 = 10 marks)

Answer ALL questions.


Choose the correct answer :

1. Which type of Programming does Python support?


(a) object-oriented programming
(b) structured programming
(c) functional programming
(d) all of the mentioned
2. Which keyword is used for function in Python
language?
(a) Function (b) Def
(c) Fun (d) Define

3. Which of the following is not used as loop in


Python?
(a) for loop (b) while loop
(c) do-while loop (d) None of the above

4. A while loop in Python is used for what type of


iteration?
(a) indefinite (b) discriminant
(c) definite (d) indeterminate

5. To add a new element to a list we use which


Python command?
(a) list1.addEnd(5) (b) list1.addLast(5)
(c) list1.append(5) (d) list1.add(5)

6. What are the two main types of functions in


Python?
(a) System function
(b) Custom function
(c) Built-in function and User defined function
(d) User function

Page 2 Code No. : 10361 E


7. In python, what is method inside class?
(a) attribute (b) object
(c) argument (d) function

8. A class variable or instance variable that holds


data associated with a class and its object is
known as?
(a) Class variable
(b) Method
(c) Operator overloading
(d) Data number

9. Which of the following is a disadvantage of linear


search?
(a) Requires more space
(b) Greater time complexities compared to other
searching algorithms
(c) Not easy to understand
(d) Not easy to implement

10. Which value is provided by kind word for bar plot?


(a) bar (b) Kde
(c) hexbin (d) his

Page 3 Code No. : 10361 E


PART B — (5 × 5 = 25 marks)

Answer ALL questions, choosing either (a) or (b).

Each answer should not exceed 250 words.

11. (a) List and explain the basic data types in


python.

Or
(b) Define variable. List out the rules for
naming the variable.

12. (a) Differentiate between the break and


continue statement.

Or
(b) Write a python program to check whether a
given year is leap year or not.

13. (a) What are the formal and actual arguments?


Explain.

Or
(b) State the difference between the lists and
dictionary.

14. (a) Compare class and object with python code.

Or
(b) Write a short note on encapsulation in
python.

Page 4 Code No. : 10361 E


[P.T.O.]
15. (a) How do you plot a straight line on a pylab?
Discuss.

Or

(b) Explain the role of sorting in python.

PART C — (5 × 8 = 40 marks)

Answer ALL questions choosing either (a) or (b).

Each answer should not exceed 600 words.

16. (a) Demonstrate the various operators in


python.

Or

(b) Classify the elements of python.

17. (a) Explain while loop and for loop with an


example.

Or

(b) Write a python program to print fibonacci


series up to n terms.

Page 5 Code No. : 10361 E


18. (a) Discuss about list operations in python.

Or
(b) Illustrate the date and time function with an
example.

19. (a) Categorize the types of exception with an


example.

Or
(b) Elaborate note on inheritance with example.

20. (a) Create a program for linear search using


array.

Or
(b) Write a python program to perform selection
sort on the elements read from the user.

———————

Page 6 Code No. : 10361 E

You might also like