Exam Details
Subject | programming with python | |
Paper | ||
Exam / Course | mca | |
Department | ||
Organization | Gujarat Technological University | |
Position | ||
Exam Date | May, 2019 | |
City, State | gujarat, ahmedabad |
Question Paper
1
Seat No.: Enrolment
GUJARAT TECHNOLOGICAL UNIVERSITY
MCA SEMESTER- III EXAMINATION WINTER 2018
Subject Code: 3630006 Date: 09-01-2019
Subject Name: Programming with 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 syntax of "lambda" function to sum of two variables x y).
ii) Give one example of List comprehension.
iii) What is the difference between extend() and append() methods of list.
iv) Give one guideline for defensive coding.
What is recursion?
vi) What is driver and stub in python?
vii) What happens if a local variable exists with the same name as the global
variable you want to access?
01
01
01
01
01
01
01
Say TRUE of FALSE with justification.
List and Tuple are immutable sequence objects in python.
ii) Binary search needs sorted array while merge sort does not need sorted array.
iii) Two parameters of pylab.plot() must be sequences of the same length.
iv) fp=open("aa.txt","w") will errored out if file does not exists.
_name is invalid statement.
vi) Suppose d d.remove() command will delete the entry
for "A".
vii) Functions and Methods are same.
07
Q.2 State in your words operator overloading and method overloading
in python.
07
Write a python program which will implement following methods using class:
Structure(ItemId, ItemName, Qty,Rate)
Constructor to initialize
ii) AddItem() to add Items and store into file (item.txt)
iii) display() will display all items via reading file (item.txt)
07
OR
A company having turnover=[100000,120000,154000,180000,205000] and
profit percentage of past 5 years. Draw line chart showing
growth of profit in amount) and turnover using pylab module in python. Draw
both graph in same figure.
07
Q.3 What is exception? Explain how to handle user defined exception in python (Give
example)?
07
Compare List, Tuple and Dictionary data types. 07
OR
Q.3 Write exception block in python. How to use exception as a control flow
mechanism?
07
What is Defensive programming? Discuss assertion using suitable example.
07
2
Q.4
What is function? How it differs from methods? Discuss use of default parameters in function using suitable example.
07
Differentiate between
Linear search and Binary search
ii) Selection sort and merge sort
07
OR
Q.4
What is module? Why we need module? Discuss various ways to use module.
07
Differentiate between
Dynamic Programming and Divide conquer
ii) Black box and White box testing
07
Q.5
Explain how dynamic programming solve knapsack 0/1 problem.
07
What is abstract data type? Explain inheritance using suitable example in python.
07
OR
Q.5
Explain class and generators using suitable example in python.
07
What fallacies, consistencies, inconsistencies appear during implementation of recursion?
07
Seat No.: Enrolment
GUJARAT TECHNOLOGICAL UNIVERSITY
MCA SEMESTER- III EXAMINATION WINTER 2018
Subject Code: 3630006 Date: 09-01-2019
Subject Name: Programming with 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 syntax of "lambda" function to sum of two variables x y).
ii) Give one example of List comprehension.
iii) What is the difference between extend() and append() methods of list.
iv) Give one guideline for defensive coding.
What is recursion?
vi) What is driver and stub in python?
vii) What happens if a local variable exists with the same name as the global
variable you want to access?
01
01
01
01
01
01
01
Say TRUE of FALSE with justification.
List and Tuple are immutable sequence objects in python.
ii) Binary search needs sorted array while merge sort does not need sorted array.
iii) Two parameters of pylab.plot() must be sequences of the same length.
iv) fp=open("aa.txt","w") will errored out if file does not exists.
_name is invalid statement.
vi) Suppose d d.remove() command will delete the entry
for "A".
vii) Functions and Methods are same.
07
Q.2 State in your words operator overloading and method overloading
in python.
07
Write a python program which will implement following methods using class:
Structure(ItemId, ItemName, Qty,Rate)
Constructor to initialize
ii) AddItem() to add Items and store into file (item.txt)
iii) display() will display all items via reading file (item.txt)
07
OR
A company having turnover=[100000,120000,154000,180000,205000] and
profit percentage of past 5 years. Draw line chart showing
growth of profit in amount) and turnover using pylab module in python. Draw
both graph in same figure.
07
Q.3 What is exception? Explain how to handle user defined exception in python (Give
example)?
07
Compare List, Tuple and Dictionary data types. 07
OR
Q.3 Write exception block in python. How to use exception as a control flow
mechanism?
07
What is Defensive programming? Discuss assertion using suitable example.
07
2
Q.4
What is function? How it differs from methods? Discuss use of default parameters in function using suitable example.
07
Differentiate between
Linear search and Binary search
ii) Selection sort and merge sort
07
OR
Q.4
What is module? Why we need module? Discuss various ways to use module.
07
Differentiate between
Dynamic Programming and Divide conquer
ii) Black box and White box testing
07
Q.5
Explain how dynamic programming solve knapsack 0/1 problem.
07
What is abstract data type? Explain inheritance using suitable example in python.
07
OR
Q.5
Explain class and generators using suitable example in python.
07
What fallacies, consistencies, inconsistencies appear during implementation of recursion?
07
Other Question Papers
Subjects
- advance database management system
- advanced biopharmaceutics & pharmacokinetics
- advanced medicinal chemistry
- advanced networking (an)
- advanced organic chemistry -i
- advanced pharmaceutical analysis
- advanced pharmacognosy-1
- advanced python
- android programming
- artificial intelligence (ai)
- basic computer science-1(applications of data structures and applications of sql)
- basic computer science-2(applications of operating systems and applications of systems software)
- basic computer science-3(computer networking)
- basic computer science-4(software engineering)
- basic mathematics
- basic statistics
- big data analytics (bda)
- big data tools (bdt)
- chemistry of natural products
- cloud computing (cc)
- communications skills (cs)
- computer aided drug delivery system
- computer graphics (cg)
- computer-oriented numerical methods (conm)
- cyber security & forensics (csf)
- data analytics with r
- data mining
- data structures (ds)
- data visualization (dv)
- data warehousing
- data warehousing & data mining
- database administration
- database management system (dbms)
- design & analysis of algorithms(daa)
- digital technology trends ( dtt)
- discrete mathematics for computer science (dmcs)
- distributed computing (dc1)
- drug delivery system
- dynamic html
- enterprise resource planning (erp)
- food analysis
- function programming with java
- fundamentals of computer organization (fco)
- fundamentals of java programming
- fundamentals of networking
- fundamentals of programming (fop)
- geographical information system
- image processing
- industrial pharmacognostical technology
- information retrieving (ir)
- information security
- java web technologies (jwt)
- language processing (lp)
- machine learning (ml)
- management information systems (mis)
- mobile computing
- molecular pharmaceutics(nano tech and targeted dds)
- network security
- object-oriented programming concepts & programmingoocp)
- object-oriented unified modelling
- operating systems
- operation research
- operations research (or)
- pharmaceutical validation
- phytochemistry
- procedure programming in sql
- programming skills-i (ps-i-fop)
- programming skills-ii (ps-oocp)
- programming with c++
- programming with java
- programming with linux, apache,mysql, and php (lamp)
- programming with python
- search engine techniques (set)
- soft computing
- software development for embedded systems
- software engineering
- software lab (dbms: sql & pl/sql)
- software project in c (sp-c)
- software project in c++ (sp-cpp)
- software quality and assurance (sqa)
- statistical methods
- structured & object oriented analysis& design methodology
- system software
- virtualization and application of cloud
- web commerce (wc)
- web data management (wdm)
- web searching technology and search engine optimization
- web technology & application development
- wireless communication & mobile computing (wcmc)
- wireless sensor network (wsn)