0% found this document useful (0 votes)
2 views5 pages

QB (Module 1 To Module 5)

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views5 pages

QB (Module 1 To Module 5)

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Module 1:

1: Discuss the various types of errors and the characteristics of debugging (1.3 to 1.7)
2: Describe the various data types with a small example (2.1)
3: What is a variable? Describe the various rules for naming a variable. (2.3)
4: Describe type convertor functions with an example (2.7)
5: Explain the precedence rules followed in the evaluation of an expression. (2.8)
6: Write programs for the following
a) Find the area of a circle (2.11)
b) Find the sum of numbers of a list (3.3.3)
c) To count the total no of digits in a number (3.3.7)
d) Simple number guessing game (3.3.13)
e) Newton’s method for finding square root (3.3.17)
f) To find compound interest (4.5)
g) Python program to read 2 numbers from the keyboard and perform the basic arithmetic operations
based on the choice. (Lab program 1a)
h) To read the name and year of birth of a person. Display whether the person is a senior citizen or not.
(Lab program 1b)
i) To generate Fibonacci sequence of length (N). Read N from the console. (Lab program 2a)

7: Explain the modulus operator with an example program (2.12)


8: Explain the working of a for loop with an example program (3.3.3)
9: Explain the working of a while loop with an example program (3.3.4)
10: What is Collatz sequence; Write a python program to generate it (3.3.5)
11: What is meant by tracing a program? Explain with an example (3.3.6)
12: What is help and meta notation (3.3.8)
13: Explain how the following can be generated using loops
a) Tables (3.3.9)
14: Explain the following statements with an example program
a: break (3.3.11)
b: continue (3.2.14)
c: pow() 4.4
d: max() 4.4
e: abs() 4.4
f: type() 2.1

15: Explain the various types of while loops (pre-test, middle-test, post-test) with an example program
(3.3.12)
16: Explain paired data using tuples (3.3.15)
17: Explain nested loops with an example program (3.3.16)
18: What is an algorithm? Explain its characteristics with an example program. (3.3.18)
19: What is a function . Explain with an example program (4.4)
20: What is meant by functions that require arguments? Explain with an example program (4.4)
21: What is meant by functions that return arguments? Explain with an example program (4.5)

Module 2
1: Explain any three string methods with example program (2.1.2)
2: Explain the following methods with an example program
a) Len() (2.1.4)
b) Find() (2.1.13)
c) Split() (2.1.14)
d) Punctuation (2.1.15)
e) Format (2.1.16)
3: Discuss string traversal using for loop with an example program (2.1.5)
4: Explain the following operations on strings with example program.
a) Slices (2.1.6)
b) Comparison (2.1.7)
c) Mutability (2.1.8)
d) In and not operator (2.1.9)
5: Write a python program for the following
a) to remove a vowels in a string (2.1.9)
b) To find the first occurrence of letter in a string (2.1.10)
c) Frequency of appearance of a character in a string (2.1.11)
d) To find the first occurrence of letter in a string from a starting position (2.1.12)
e) To find the first occurrence of letter in a string from a starting and end position (2.1.12)
f) To remove punctuations in a string (2.1.15)
g) To demonstrate alignment, formatting (2.1.16)
6: What is a tuple? Explain its operations on a tuple with an example program (2.2)
7: What is a list? Explain the following operations on a list with an example program
a) List length (2.3.3)
b) List membership (2.3.4)
c) List slices (2.3.6)
d) List mutability (2.3.7)
e) List deletion (2.3.8)
f) List traversal (2.3.2)
8: What is meant by aliasing in python. Explain with an example program. (2.3.10)
9: Differentiate between closing and aliasing with an example program (2.3.10)
10: Can list be passed as a parameter to a function. If yes explain with an example program (2.2.13)
11: Explain the following list methods with an example program (2.3.14)
a) append()
b) insert()
c) count()
d) extend()
e) index()
f) reverse()
g) sort()
h) remove()
12: Differentiate between pure function and modifier function with an example program (2.3.15)
13: Can we use a custom delimiter in split(). If yes explain with an example program (2.3.17)
14: Explain join() with an example program (2.3.17)
15: Explain nested lists with an example program (2.3.20)
16: Write a simple python program to create a matrix and access its elements using nested lists (2.3.21)
17: Write a python program to create a list and perform the following operations • Inserting an element •
Removing an element • Appending an element • Displaying the length of the list • Popping an element •
Clearing the list (Lab program 2.b)
18: Read N numbers from the console and create a list. Develop a program to print mean, variance and
standard deviation with suitable messages (Lab program 3.a)
19: Develop a program to read 6 subject marks from the keyboard for a student. Generate a report that
displays the marks from the highest to the lowest score attained by the student. [Read the marks into a 1-
Dimesional array and sort using the Bubble Sort technique]. (Lab program 5)
20: Differentiate between tuple and list
Module 3:
1: Write a python program to read a multi-digit number (as chars) from the console. Develop a program to
print the frequency of each digit with a suitable message. (Lab program 3.b)
2: Differentiate between list, tuple and dictionary
3: Write a python program to create a dictionary and access its elements (3.1)
4: Explain with example programs how to perform the following operations on a dictionary
a) add a key value pair (3.1.1)
b) update a value (3.1.1)
c) remove a key value (3.1.1)
5: Explain the following methods with respect to dictionaries
a) keys() (3.1.2)
b) values() (3.1.2)
c) items() (3.1.2)
6. Develop suitable program to illustrate insertion, deletion, and lookup in a dictionary (3.1.1)
7: Write a python program to traverse through a dictionary using for loop. (3.1.2)
8: Differentiate between aliases and copying of a dictionary with an example program. (3.1.3)
9: Write a python program to print the frequency count of each character in a string. (3.1.4)
10: Explain the use of get() with respect to dictionary using an example program. (3.1.4)
11: What is meant by shape of an array and why is it essential. Explain with example program how to find
the shape of a 1D and 2D array. (3.2)
12: Why is slicing powerful. Explain with example program slicing on 1D and 2D array (3.3).
13: What is masking in NumPy, ? Explain its uses and importance . Develop a program to illustrate masking
to filter array elements. (3.4)
14: What is Broadcasting in NumPy and state the rules to perform it. Explain its uses and importance .Write
a python program to demonstrate Broadcasting of array elements and also demonstrate when Broadcasting
fails. (3.5)
15: What is dtype in python. Explain its usage.
16: What is a file and what its advantages. Explain the following operations on a file with an example
program (3.7 and 3.8)
a) open b) read c) write d) close
17: Explain the following functions and their significance with respect to files
a) read() b) readlines() c) write()
18: Explain the use of the ‘with’ statement in file handling with an example program (3.8)
19: What us a file filter explain simple file filter program (3.12)
20: Develop a program to print 10 most frequently appearing words in a text file. [Hint: Use a dictionary
with distinct words and their frequency of occurrences. Sort the dictionary in the reverse order of frequency
and display the dictionary slice of the first 10 items. (Lab Program 4)
21: Develop a program to sort the contents of a text file and write the sorted contents into a separate text file.
(Lab Program 6)
22: Build a tool that analyses a paragraph: frequency of each word, longest word, number of sentences, etc.
(Lab program 9)
23. Develop Data Summary Generator: Read a CSV file (like COVID data or weather stats), convert to
dictionary form, and allow the user to run summary queries: max, min, average by column. (Lab program
10)
24. Develop Student Grade Tracker: Accept multiple students’ names and marks. Store them in a list of
tuples or dictionaries. Display summary reports (average, topper, etc.). (Lab program 11)
25: What is the use of [Link] in python. Explain the [Link]() with an example program.
26: Develop a program to display contents of a folder recursively (Directory) having sub-folders and files
(name and type). (Lab program 12)
27: How the functions used for fetching data from the Web with example program.
Module 4
1: Explain random module with example programs (4.1)
2: Explain time module with example programs (4.2)
3: Explain math module with example programs (4.3)
4: What are the steps to create one’s own module? Explain with an example program. (4.4)
5: What is meant by namespace? Explain the various namespaces with an example program. (4.5)
6: What is meant by scope of a variable? Explain the various scope of a variable example program. (4.6)
7: Define the various modes of importing a module in python (4.7)
8: Define class and object. Explain with syntax the following (4.10.1)
a) define a class (4.10.2)
b) instantiate a class (4.10.2)
c) access the class members. (4.10.2)
9: Explain __init__() and __str()__() with an example. (4.10.2), 4.10.7
10: What is self in python programming with an example. . (4.10.2)
11: What is a method. Expalin with an example. (4.10.5)
12: Can we pass an instance (object) as a parameter to a function. Explain as an example (4.10.6)
13: Can we return an instance from a function. Explain with an example (4.10.8)
14: Can we return an instance from a method. Explain with an example (4.10.8)
15: Define a function that takes TWO objects representing complex numbers and returns a new complex
number with the sum of two complex numbers. Define a suitable class ‘Complex’ to represent the complex
number. Develop a program to read N (N >=2) complex numbers and to compute the addition of N complex
numbers. (Lab Program 8)
Module 5
1: Create a Python class Point with attributes x and y. Demonstrate sameness using ‘is’ operator, and deep
equality using == show the effect of mutability when modifying one reference. (5.1.1, 5.1.12)
2: Differentiate between shallow copy and deep with an example (5.1.3)
3: Outline the difference between pure functions and modifiers with an example (5.2 , 5.2.1)
4: What is meant by Generalization, explain with an example (5.2.4)
5: What is operator overloading? Illustrate with example using __add__(), __mul__, __rmul__, (5.2.6)
6: What is polymorphism. Develop a program to illustrate polymorphism . (5.2.7)
7: Explain the need for exception handling in Python. Develop a program to illustrate try, except, else,
finally blocks. (5.3)
8: Briefly explain Assertion and raising an exception (5.4)
9: Develop a function named DivExp which takes TWO parameters a, b, and returns a value c (c=a/b).
Write a suitable assertion for a>0 in the function DivExp and raise an exception for when b=0. Develop
a suitable program that reads two console values and calls the function DivExp. (Lab Program 7)

You might also like