Module 1
1. Explain syntax errors, runtime errors, and semantic errors with examples.
2. Explain the Collatz 3n + 1 sequence and develop a program.
3. Explain break and continue statements with examples.
4. Explain implicit and explicit type conversion with examples.
5. Develop a program to generate the Fibonacci sequence.
6. Write a Python program to calculate the factorial of a number.
7. Explain functions with arguments and return values..
8. Salient features of Python.
9. Modulus operator.
10. Order of operations.
11. Function composition.
12. Difference between for and while loops.
Module 2
1. Explain string operations:
Slicing
Concatenation
Repetition
Comparison
2. Explain string methods with examples:
find()
split()
upper()
isupper()
len()
3. Explain lists are mutable with examples.
4. Explain aliasing and cloning of lists.
5. Differentiate between list and tuple.
6. Explain tuple assignment and tuples as return values.
List slicing.
Nested lists.
List membership.
Strings are immutable.
Tuple immutability.
Module 3:
1. Explain dictionary operations and methods:
keys()
values()
items()
insertion
deletion
lookup
2. Explain aliasing and copying in dictionaries.
3. Explain NumPy concepts:
Shape
Slicing
Broadcasting
Masking
dtype
4. Explain differences between text files and binary files.
5. Explain file handling using the with statement.
6. Reading files line by line.
7. read(), readlines(), write().
8. Fetching data from the web.
9. Directory handling.
Module 4:
1. Explain the three import variants:
import module
from module import name
from module import *
2. Create a user-defined module and import it.
3. Explain namespaces and the LEGB rule with a program.
4. Explain mutable vs immutable objects.
5. Explain classes and objects with syntax.
6. Explain class attributes and instance attributes.
7. Explain:
__init__()
__str__()
8. Explain instances as arguments and return values.
1. Scope and lookup rules.
2. Dot operator.
3. Random module.
4. Math module.
5. Time module.
6. is vs == using immutable objects.
Module 5:
1. Explain objects are mutable with examples.
2. Explain sameness using:
is
==
1. Explain pure functions and modifiers.
2. Explain operator overloading.
3. Explain polymorphism with examples.
4. Explain exception handling:
try
except
else
finally
1. Explain raising your own exceptions.
2. Explain assertions.
3. Copying objects.
4. Generalization.
5. Inheritance.
6. Deep equality.
7. Shallow copying.
Programs:
1. Generate even Fibonacci numbers.
2. Find whether a person is a senior citizen.
3. Basic arithmetic calculator using menu choice.
4. Check whether a string is a palindrome.
5. Count words in a sentence.
6. Bubble sort using lists.
7. List operations:
- append()
- insert()
- remove()
- pop()
8. Word frequency using dictionaries.
9. Display top three or top ten frequent words.
Create [Link] with square, cube and factorial functions.
LEGB demonstration program.
Point class demonstrating sameness and mutability.
Polymorphism using common interface methods.
Division program using assertions.