python question bank
python question bank
PART A
Q. Blooms Level
Questions CO (BTL1/BTL2)
No.
1. Define Algorithm CO1 BLT1
2. What are the components of a computer CO1 BLT1
3. How will you analyze the efficiency of an algorithm? CO1 BLT1
4. What is the use of algorithm, Flowchart and Pseudocode in the CO1
BLT1
perspective of problem solving?
5. List the different building blocks of algorithms. CO1 BLT1
6. Illustrate an algorithm to determine the minimum number in a list of CO1 BLT2
7. given numbers.
Demonstrate how to create an algorithm that accepts two numbers, CO1 BLT2
8. computes their sum, and are
Explain what flowcharts displays the result.
and outline their advantages. CO1 BLT2
9. Summarize the benefits of using algorithms in problem-solving. CO1 BLT2
10. Illustrate with a flowchart how to find the largest number among CO1 BLT2
three given numbers.
PART B
Blooms Level
Q.
Questions CO (BTL3 to
No. BTL6)
11. Apply your understanding of the building blocks of an algorithm by CO1
providing examples for each and explaining their role in solving a BLT3
computational problem.
12. Demonstrate the steps involved in identifying a computational CO1 BLT3
problem by selecting a real-world scenario and breaking it down into
smaller components.
13. Use the iteration method to develop an algorithm for solving a CO1 BLT3
problem of your choice, and explain the steps involved.
14. Analyze the concept of a recursive function. Evaluate its CO1
advantages and disadvantages, and compare its functionality BLT4
with that of an iterative function by providing examples.
15. Examine the process of determining the greatest among three CO1 BLT4
numbers. Create and analyze a flowchart to accept three
numbers, find the greatest, and print the result.
16. Analyze the process of calculating the sum of the series 1+2+3+⋯ CO1 BLT4
+1001 + 2 + 3 + \dots + 1001+2+3+⋯+100. Develop and evaluate
a flowchart to illustrate this process.
17. Outline the problem of the Towers of Hanoi and break it down CO1
into smaller components. Analyze and suggest a step-by-step BLT5
solution using diagrams to represent the process.
18. Evaluate an algorithm to compute the factorial of a number nnn. CO1 BLT5
Justify the efficiency and correctness of the algorithm.
19. Assess a pseudocode and flowchart for adding two matrices. CO1 BLT5
Critically evaluate their clarity and effectiveness in solving the
problem.
20. Examine an algorithm to print the Fibonacci series CO1 BLT4
(0,1,1,2,3,5,8,13,… )(0, 1, 1, 2, 3, 5, 8, 13, \dots)(0,1,1,2,3,5,8,13,
PART C
Blooms Level
Q.
Questions CO (BTL3 to
No. BTL6)
Design a flowchart and develop an algorithm to sort a list of
21. numbers in ascending order. Justify your approach and suggest CO1 BLT6
possible optimizations.
Create a detailed explanation of the various symbols used in
22. flowcharts. Design a flowchart to add an array of NNN elements CO1 BLT6
and evaluate its effectiveness in representing the process.
Develop and propose strategies for creating algorithms.
23. Illustrate your strategies with an example that demonstrates CO1 BLT6
their application and impact.
Design and construct a comprehensive explanation of the process
of algorithm design and analysis. Apply your insights to a real-
24. world problem and discuss how your design and analysis CO1 BLT6
improve its solution.
UNIT II
PART A
Blooms Level
Q. No. Questions CO (BTL1/BTL2)
UNIT III
PART A
Blooms Level
Q. No. Questions CO (BTL1/BTL2)
1. Writethesyntaxofif andif-else statements. CO3 BLT1
2. Listouttheapplicationsofarrays. CO3 BLT1
3. Whatwillbetheoutputofprintstr[2:5]ifstr=’hello world!’? CO3 BLT1
4. Writeaprogramtoiteratearangeusingcontinue statement. CO3 BLT1
5. Wheredoesindexingstartsinpython? CO3 BLT1
6. Givetheuseofreturn ()statementwith asuitable example. CO3 BLT2
7. Discussaboutcontinueandpass statements. CO3 BLT2
8. Namethetype ofBoolean operators. CO3 BLT2
9. Explain aboutbreakstatementwithan example. CO3 BLT2
10. Definearraywithanexample. CO3 BLT1
PART B
Blooms Level
Q. No. Questions CO (BTL3 to BTL6)
11. Explainthesignificanceofforloopwithelseinan example. CO3 BTL5
12. Differentiateforloopandwhile loop. CO3 BTL4
13. Illustrate theflowchartofif-elif-elsestatements CO3 BTL3
14. Describevariousmethodsusedona string.(AnyFour) CO3 BTL3
15. Whataretheadvantages anddisadvantagesofrecursionfunction? CO3 BTL3
16. Analyzedifferentwaystomanipulatestringsinpython. CO3 BTL4
17. Summarizestringmodules CO3 BTL5
18. Generateaprogramthatuseslambdafunctionmultiplytwo
numbers.Discussthemethodstomanipulatethearraysin CO3 BTL4
python
19. Explainthesignificanceofxrange()functioninforloopwithahelpof
aprogram CO3 BTL5
20.
(i). Createaprogramtoreverseastringwithoutusingrecursion
CO3 BTL3
(ii). Illustratetheconceptoflocalandglobalvariables
PART C
Blooms Level
Q. No. Questions CO (BTL3 to BTL6)
21. Justifytheeffectsofslicingoperationsonanarray CO3 BTL6
22. Howtoaccesstheelementsofanarrayusingindex? CO3 BTL6
Createapythonprogramtofindthegivenyearis leapor not
23. CO3 BTL6
Investigateonmutabilityandimmutabilityinpython
(i)Explainthedifferenttypesofthefunctionprototypewithanexample
24. (ii).ExaminetheprogramonFibonacciseries CO3 BTL4
UNIT IV
PART A
Blooms Level
Q. No. Questions CO (BTL1/BTL2)
1. DefinePythonlist. CO4 BTL1
2. Whatarethelist operations? CO4 BTL1
3. Whatarethedifferentwaystocreatealist? CO4 BTL1
4. Listoutthemethodsthatareavailablewithlistobjectinpython CO4 BTL1
5. programming
DefinePythontuple. CO4 BTL1
6. Describelistslicingwithexamples. CO4 BTL2
7. Whataretheadvantagesoftupleoverlist? CO4 BTL2
8. Whataretheproperties ofdictionarykeys? CO4 BTL2
9. Whatistheuseofall(), any(),cmp() andsorted()indictionary? CO4 BTL2
10. Definedictionarywithan example. CO4 BTL1
PART B
Blooms Level
Q. No. Questions CO (BTL3 to BTL6)
11. ExplainthebasicListOperationsin detailswithnecessaryprogram.
WriteaPythonprogramtomultiply two Matrices CO4 BTL4
12. Illustratethewaysofcreatingthetupleandthe tuple CO4 BTL3
assignmentwithsuitable programs
13. Explain thebasicTupleOperationswithexamples.
Writeaprogramtocheckwhetheranelement „y‟and„a‟ CO4 BTL4
belongstothetupleMy_tuple=(„p‟,‟y‟.‟t‟,‟h‟,‟o‟,‟n‟)and after
printingtheresult,deletethetuple.
14. Explaintheproperties ofDictionarykeyswithexamples.
CO4 BTL4
IllustratethepythonDictionary Comprehensionwith examples.
15. Write a python program named Weather that is passed a
dictionary of daily temperatures , and returns theaverage
temperature over the Weekend for the weekly temperatures CO4 BTL6
given.
16. Evaluate the operations available for dynamically manipulating
CO4 BTL4
dictionaries in Python with examples.
17. Appraise the effectiveness of the linear search algorithm by
designing a Python program that performs the search operation on CO4 BTL5
a list.
18. Assess the functionality of dictionary manipulation operations by
implementing a program that dynamically updates and removes CO4 BTL5
items.
19. Design a Python script to sort N numbers using the selection sort CO4 BTL6
algorithm.
20. Create a Python program to store ‘n’ numbers in a list and sort the CO4 BTL6
list using selection sort.
PART C
Blooms Level
Q. No. Questions CO (BTL3 to BTL6)
Createapythonprogram toperformselectionsortontheelements
21. CO4 BTL6
Readfromthe user.
Writeaprogramthatusesinsertionsorttechniquetosortanarrayof 10
22. CO4 BTL5
elements
Explainindetailabout:
Creatingadictionary
23. Accessingvaluesina dictionary CO4 BTL5
Updating dictionary
Deletingelementsfrom dictionary
WriteaPythonprogramtocreateahistogramfrom a givenlist
24. ofintegers. Performmerge sortonagiven list of elements CO4 BTL6
UNIT V
PART A
Blooms Level
Q. No. Questions CO (BTL1/BTL2)
1. Definetheaccess modes CO5 BTL1
2. Distinguishbetweenfilesand modules. CO5 BTL2
3. Definereadandwritefile. CO5 BTL1
4. Describerenamingand delete. CO5 BTL2
5. Differencebetweenbuiltinexceptionsandhandling exception CO5 BTL1
6. Howto import statements? CO5 BTL1
7. Differencebetweenglobaland local. CO5 BTL1
8. Identifywhatarethepackagesin python CO5 BTL1
9. Describebuilt–inclassattribute. CO5 BTL2
10. DescribetheimportStatements CO5 BTL1
PART B
Blooms Level
Q. No. Questions CO (BTL3 to BTL6)
11. WriteaPythonprogramto demonstratethefileI/Ooperations CO5 BLT4
12. Writeaprogramtocatch aDividebyzeroexception.Addafinally
blocktoo. Writeafunction toprintthehashofanygivenfileinpython CO5 BLT4
Analyzetheuniversityresultofvariouscollegesindepartmentwise
23. usingread andwrite file CO5 BTL4