Advanced Python Programming – Question Bank Unit 1 to 4 – B.
Sc CA&IT Semester 6
Unit 1 :
1.Run time complexity of Binary search algorithm is ______.
a. O (log n)
b. (log)n
c. N(Log)n
d. O(1)
2._____________ testing is performed without looking at the code.
a. Whitebox
b. Blackbox
c. Glassbox.
d. Unit
3._____________ testing the complex code is broken into modules.
a. Blackbox
b. Glassbox
c. Unit
d. Integration
4.The process of searching for the explanation of unwanted behaviour of the
program is known as _______
a. Debugging
b. Unit Testing
c. Integration Testing
d. Seeking
5._______ is an event which occurs during the program execution and
interrupt normal flow of the program.
a. Exception
b. Debugging
c. Testing
d. Redesigning
6.___________ Error is raised when maximum limit of numerical data
exceeds.
a. ValueError
b. OverflowError
Advanced Python Programming – Question Bank Unit 1 to 4 – B.Sc CA&IT Semester 6
c. KeyboardError
d. NameError
7. ___________ Error is raised when import statement fails.
a. ValueError
b. OverflowError
c. ImportError
d. NameError
8.___________ Error is raised when variable is not found in local or global
namespace.
a. ValueError
b. OverflowError
c. ImportError
d. NameError
9.While performing divison operation user should take care of ______ error.
a. ValueError
b. ZeroDivisionError
c. ImportError
d. NameError
10. ________statements block will always executed.
a. Else
b. Except
c. Raise
d. Finally
11. Which of the following search algorithm the data values are stored in
sequential relationship.
a. Binary
b. Linear
c. Both a and b
d. None of the above
12.Which of the following search algorithm required the data values to be
stored in sorted order.
a. Binary
b. Linear
c. Both a and b
d. None of the above
Advanced Python Programming – Question Bank Unit 1 to 4 – B.Sc CA&IT Semester 6
Unit 2
1. ________________sub-package offers the following functionalities to
build new XML documents a DOM object tree.
a. xml.dom
b. xml.dom.minidom
c. xml.dom.dom
d. xml.minidom
2. ___________ removes node from its parent node.
a. Node.unlink
b. Node.link
c. Node.remove
d. Node.free
3. ___________ statement is used to work with threads.
a. Import threads
b. Import threading
c. Import element
d. Import thread
4. Structure of thread consist of _______ parts.
a. 1
b. 2
c. 3
d. 4
5. threading.Thread() function creates new thread required __________
arguments.
a. Target,args
b. Target,Time
c. Time,Target
d. Args,Time
6. _______ method is used to add data to dataframe .
a. pop
b. add
c. fill
d. append
7. _____________ function creates new thread.
a. _thread.start_new_thread
b. _thread.start_new
Advanced Python Programming – Question Bank Unit 1 to 4 – B.Sc CA&IT Semester 6
c. _thread.start
d. _thread.start_thread
8. Creating of data frame requires _________ package to be imported.
a. Time
b. Pandas
c. Matplotlib
d. Math
9. ___________ function is used to access row from a DataFrame.
a. Location
b. Loc
c. Index
d. Subscript
10. ___________ function is used to delete row from a DataFrame.
a. pop
b. drop
c. remove
d. erase
Unit 3
1. _______ widget is used for input.
a. Entry
b. Text
c. Label
d. Button
2. _______method is used to set the dimensions of the Tkinter window.
a. Window
b. PanelWindow
c. Geometry
d. mainloop
3. _________ are anonymous functions, implying they don't have a name.
a. Lambda
b. UDF
c. External
d. Global
4. _______ means creating new sequences using a given python sequence.
a. Generators
b. Closures
Advanced Python Programming – Question Bank Unit 1 to 4 – B.Sc CA&IT Semester 6
c. Comprehension
d. Iterators
5. new_dict ={key:value for (key, value) in list3} is an example of ______
comprehension.
a. List
b. Set
c. Tuple
d. Dictionary
6. The ______ method is called for the initialization of an iterator.
a. next()
b. previous()
c. iter()
d. iteration()
7. A generator-function uses _____ keyword to generate new words.
a. Return
b. Yield
c. Generate
d. New
8. Closure is a _________ function.
a. Nested
b. User Defined
c. Inner
d. Outer
9. _________ is a design pattern in Python that allows a user to add new
functionality to an existing object without modifying its structure.
a. Decorator
b. Closure
c. Generator
d. Iterator
10 ._______ organizes the widgets in table-like structure before
placing in the parent widget.
a. Grid
b. Pack
c. Place
d. All of the above
Advanced Python Programming – Question Bank Unit 1 to 4 – B.Sc CA&IT Semester 6
11.________ method organizes the widgets in blocks before placing in the
parent widget.
a. Grid
b. Pack
c. Place
d. All of the above
12._________ is used to call a function
a. Call
b. Command
c. Set
d. Get
13._______ acts as a container to hold the widgets.
a. Grid
b. Frame
c. Window
d. Canvas
14. _______ widget allows to input values only by selecting from a fixed value of
numbers.
a. RadioButton
b. PanedWindow
c. ScrollBar
d. SpinBox
MCQ unit 4 –
1. ___________ function is used to load data of csv file into a dataframe.
a. read.csv
b. read_csv
c. read
d. csv
2. _________ is a one dimensional array that holds data of any type.
a. Data Frame
b. Series
c. Dictionary
d. Correlations
3. CSV stands for ____________________________.
a. comma-separated values
b. comma-separated vector
c. common-separated values
d. common-separated vector
Advanced Python Programming – Question Bank Unit 1 to 4 – B.Sc CA&IT Semester 6
4. JSON file consist of text in quoted-string which contains of the value in
key-value mapping within _________.
a. [ ]
b. { }
c. ( )
d. < >
5. plot() function is available in ____________ package.
a. statics
b. math
c. matplotlib
d. Pandas
6. JSON array is equivalent to ________ data type of Python.
a. list
b. series
c. dictionary
d. set
7. json.load() accepts file object, parses the JSON data, populates a Python
_________ with the data and returns it back.
a. list
b. series
c. dictionary
d. tuple
8. The ______ method allows us to replace empty cells with a value.
a. fill()
b. fillna()
c. empty()
d. fillempty()
9. ___________ function is used to remove rows containing empty cells.
a. drop
b. remove()
c. dropna()
d. removena()
Advanced Python Programming – Question Bank Unit 1 to 4 – B.Sc CA&IT Semester 6
10. Empty cells can be filled with ________ values.
a. mean
b. median()
c. mode()
d. All of the above()
11. The ________ method calculates the relationship between each column
in your data set.
a. corr()
b. coor()
c. relate()
d. relation()
12.Perfect correlation range value varies from __________.
a. 1 to -1
b. -1 to 1
c. 0 to 1
d. -1 to 0
SQ- Unit 1
1. What is testing . List different types of testing.
2. Differentiate between Glass box and Blackbox testing
3. What is unit testing and Integration testing.
4. What is Debugging. List different types of bugs.
5. What is exception. Give one example.
6. List different types of error.
7. Explain use of raise clause in exception handling. Give one example.
8. Explain syntax for using multiple exceptions.
9. What is user defined exception? Give syntax.
Long Questions Unit 1 –
1. Write detailed note on Black box testing.
2. What is Glass box testing . List rules for Glass box testing.
3. Explain in detail steps used to perform systematic debugging. (6 steps)
4. Explain ZeroDivision and IOError Exceptions with example.
5. Explain with syntax and example Try ..Except ..Else statement.
6. Explain with syntax and example Try..finally statement
7. Explain Linear /Binary search algorithm. (Any one)
8. Explain selection/bubble sort algorithm. (Any one)
Advanced Python Programming – Question Bank Unit 1 to 4 – B.Sc CA&IT Semester 6
Short Questions Unit 2
1. What is xml file?
2. What is data frame? Give one example.
3. State general form of an xml document.
4. Define Sockets and Threads.
5. List advantages of multithreading.
6. Give example of dropping a row from a dataframe.
Long Questions unit 2.
1. Explain Creating XML file using ElementTree
2. Explain Server socket method.
3. Explain Client socket method.
4. What is threading? Explain how to start a new thread.
5. Explain how to locate specific rows, multiple rows, and locating rows
using named index.
6. Explain how to append rows in dataframe using default index and
named index.
Short Questions Unit 3 -
1. What is Lambda function ? Give syntax and example.
2. Explain list comprehensions in brief with example.
3. Explain set comprehensions in brief with example.
4. Explain iter() and next()method of iterators.
5. What is Tinkter. Explain use of mainloop() method.
6. List Tinkter GUI Widgets.
7. List steps to create Tinkter app.
8. List 3 main geometry manager classes. Explain any one in brief.
9. Explain purpose and syntax of Message widget.
10.Explain purpose and syntax of Scrollbar widget.
Long Questions Unit 3 -
1. Explain Decorators in detail with example.
2. Explain Closure in detail with example.
3. Explain generators in detail with example.
4. Explain comprehensions in detail with example.
5. Write detailed note on iterator with example.
Advanced Python Programming – Question Bank Unit 1 to 4 – B.Sc CA&IT Semester 6
6. Tinkter GUI Widgets (any 3 ) :
i) Button
ii) CheckButton
iii) Listbox
iv) Entry
v) Label
vi) RadioButton
7. Explain Menu Widget in detail with example.
Short Questions unit 4:
1. What is Pandas? State its functions.
2. What is Pandas Series ? Give one example.
3. Explain Deserialization of JSON.
4. Explain json.load() function
5. Explain head() function with example.
6. Explain tail() function with example.
7. Explain how to remove duplicates from csv file.
8. Explain Data Cleaning in brief.
Long Questions unit 4:
1. Explain correlations in detail
2. Explain Creating Key/Value Objects as Series and selecting
particular items from series.
3. Explain plot() method and scatter plot()
4. Explain how to fix wrong data in .csv file.
5. Explain how to clean empty cells in .csv file.
6. Explain how to clean data of wrong format in .csv file.