Python Programming 2018 Question Paper — Government College of Engine…
The 2018 Python Programming previous year question paper (Government College of Engineering and Technology, Jammu), with every question and its marks.
- University: Government College of Engineering and Technology, Jammu
- Subject: Python Programming
- Course: Python Programming
- Branch: CIVIL/COM/ELEC/E&C/MECH ENGINEERING
- Year: 2018
- Paper: end-term
- Duration: 180 minutes
- Total marks: 100
Instructions
- Attempt five questions in all selecting at least two questions from each Section.
- Each question carries 20 marks.
Questions
Section A
- QQ1. (a) What do you mean by Python Programming Language. Explain various characterstics of object-oriented languages. List different advantages of Python. [10] (b) What is an Algorithm? Write Algorithm to find greatest of three numbers. [05] (c) Draw a flow chart to print greatest of three numbers. [05] [20 marks]
- QQ2. (a) Explain the following list methods with an example I. len() II. sum() III. any() IV. append() V. extend() [10] (b) Explain Relational Operators in Python with example. [05] (c) Differentiate between break and continue statement in Python with example. [05] [20 marks]
- QQ3. (a) How to declare and call function in Python. Illustrate with an example. [05] (b) What do you mean by parameter passing to a function. Explain with an example [05] (c) What is module, package and library in python? What is the procedure to create your own package/library in python? [10] [20 marks]
- QQ4. (a) What do you mean by String Slicing? Explain different String Slicing operators in Python with example. [10] (b) What is an import Statement? How python interpret it? Name the python modules which need to be imported to invoke (a) sin() and (b) randint() functions [10] [20 marks]
Section - B
- QQ5. (a) Explain the various types of control Statements available in python with examples and Flowcharts. [10] (b) Write Python code to multiply two matrices using nested loops and also perform transpose of the resultant matrix. [10] [20 marks]
- QQ6. (a) What do you mean by class and class variables in Python? Explain how to create a class and object in Python with example. [10] (b) Explain the following with example i. Inheritance ii. Polymorphism [10] [20 marks]
- QQ7. (a) Describe in details how exceptions are handled in python? Give relevant example. [10] (b) Explain different modes for opening a file in python and explains the same. [10] [20 marks]
- QQ8. (a) Write a program to sort n numbers in a list and then sort the list using insertion sort. [10] (b) Write Python Program to reverse each word in a text file. [10] [20 marks]