Exam Details
Subject | python (py) | |
Paper | ||
Exam / Course | mca(integrated) | |
Department | ||
Organization | Gujarat Technological University | |
Position | ||
Exam Date | November, 2018 | |
City, State | gujarat, ahmedabad |
Question Paper
1
Seat No.: Enrolment
GUJARAT TECHNOLOGICAL UNIVERSITY
MCA Integrated SEMESTER- V EXAMINATION WINTER 2018
Subject Code: 4450601 Date: 28-11-18
Subject Name: Python
Time: 10.30 am to 1.00 pm Total Marks: 70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
Q.1
Do as Directed
Write a Single Python statement which will swap values of two variables without using temporary third variable.
ii) What is the difference between append() and extend() method of List.
iii) Give one difference between Testing and Debugging.
iv) Explain Terms: List Comprehension, Assertion
What is the role of constructor and "self" in Python Class?
01
01
01
02
02
Say TRUE or FALSE with justification.
One can import only one module at a time with "import" statement.
ii) List and Tuple are mutable sequence objects in python.
iii) We must give atleast two arguments x and while using pylab.plot() function.
iv) The most important debugging tool is "print" statement.
Exceptions are used purely for errors.
vi) Hash function maps a large space of inputs to a smaller space of outputs.
vii) An assertion is the key idea behind Dynamic Programming.
07
Q.2
Explain how and are overloaded in python.
ii) Discuss various ways to use module in a program.
03
04
Write a program for Youth Festival registration with following methods using class
Constructor to initialize values provided Student Name, Institute Short Name, Event Name, Scores list)
ii) AddScore method to add scores
iii) display method to display details
07
OR
Write a program of Toll Plaza with Read and write) using functions
Function to write vehicle details Vehicle_Number, tr_date(ddmmyy),from_city, to_city, charge) into file use as delimiter).
ii) Display details of vehicles travelled between Ahmedabad and Anand.
07
Q.3
Explain functions in python with default arguments using suitable example.
07
Discuss similarity or dissimilarity between Black Box testing and White Box Testing.
07
OR
Q.3
Write try-except block. Explain how to handle user defined exception in python.
07
Differentiate between Persistent Bug and Intermittent Bug.
ii) Please comment Debugging is considered as a search process.
03
04
Q.4
Write a program to find factorial with Iterative and Recursive methods.
07
Compare and explain Binary and Linear Search using suitable example.
07
OR
Q.4
Discuss implementation of "inheritance" using suitable example.
07
Explain how Merge sort is working using a program to sort five numbers
07
2
Q.5
Explain below function of pylab library with suitable examples. 1.figure(), 2. 3.savefig(), 4.title(), 5.xlabel(), 6.ylabel(), 7. legend()
07
What is dynamic programming? Why recursive solution is not effective? How it is different from Divide-and-conquer algorithms?
07
OR
Q.5
What do you mean by 0/1 Knap Sack problem Explain with example
07
Explain below functions of python using suitable example:
List methods insert(), remove()
ii) Strings Methods: rindex(), replace()
iii) dictionary d.get(k,v)
iv) files: readlines()
07
Seat No.: Enrolment
GUJARAT TECHNOLOGICAL UNIVERSITY
MCA Integrated SEMESTER- V EXAMINATION WINTER 2018
Subject Code: 4450601 Date: 28-11-18
Subject Name: Python
Time: 10.30 am to 1.00 pm Total Marks: 70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
Q.1
Do as Directed
Write a Single Python statement which will swap values of two variables without using temporary third variable.
ii) What is the difference between append() and extend() method of List.
iii) Give one difference between Testing and Debugging.
iv) Explain Terms: List Comprehension, Assertion
What is the role of constructor and "self" in Python Class?
01
01
01
02
02
Say TRUE or FALSE with justification.
One can import only one module at a time with "import" statement.
ii) List and Tuple are mutable sequence objects in python.
iii) We must give atleast two arguments x and while using pylab.plot() function.
iv) The most important debugging tool is "print" statement.
Exceptions are used purely for errors.
vi) Hash function maps a large space of inputs to a smaller space of outputs.
vii) An assertion is the key idea behind Dynamic Programming.
07
Q.2
Explain how and are overloaded in python.
ii) Discuss various ways to use module in a program.
03
04
Write a program for Youth Festival registration with following methods using class
Constructor to initialize values provided Student Name, Institute Short Name, Event Name, Scores list)
ii) AddScore method to add scores
iii) display method to display details
07
OR
Write a program of Toll Plaza with Read and write) using functions
Function to write vehicle details Vehicle_Number, tr_date(ddmmyy),from_city, to_city, charge) into file use as delimiter).
ii) Display details of vehicles travelled between Ahmedabad and Anand.
07
Q.3
Explain functions in python with default arguments using suitable example.
07
Discuss similarity or dissimilarity between Black Box testing and White Box Testing.
07
OR
Q.3
Write try-except block. Explain how to handle user defined exception in python.
07
Differentiate between Persistent Bug and Intermittent Bug.
ii) Please comment Debugging is considered as a search process.
03
04
Q.4
Write a program to find factorial with Iterative and Recursive methods.
07
Compare and explain Binary and Linear Search using suitable example.
07
OR
Q.4
Discuss implementation of "inheritance" using suitable example.
07
Explain how Merge sort is working using a program to sort five numbers
07
2
Q.5
Explain below function of pylab library with suitable examples. 1.figure(), 2. 3.savefig(), 4.title(), 5.xlabel(), 6.ylabel(), 7. legend()
07
What is dynamic programming? Why recursive solution is not effective? How it is different from Divide-and-conquer algorithms?
07
OR
Q.5
What do you mean by 0/1 Knap Sack problem Explain with example
07
Explain below functions of python using suitable example:
List methods insert(), remove()
ii) Strings Methods: rindex(), replace()
iii) dictionary d.get(k,v)
iv) files: readlines()
07
Other Question Papers
Subjects
- advanced c programming (adv – c)
- advanced python
- basic mathematics for it
- big data
- c++ with class libraries (cpp)
- communication skills - ii
- communication skills-1
- cyber security and forensics (csf)
- data analytics with r
- data structure
- database management systems
- discrete mathematics for computer science (dmcs)
- environmental studies
- fundamentals of computer
- fundamentals of database management systems
- fundamentals of networking
- fundamentals of programming – i
- fundamentals of web
- information security
- java programming
- machine learning
- management information systems (mis)
- mobile programming
- network security
- operating system
- operations research
- python (py)
- software engineering
- software testing
- statistical methods
- uml & object oriented modeling
- web development tools