Updated Python Programming Module Wise Notes
Python Programming – Module Wise Exam Notes
MODULE I – Introduction to Python and Control Flow
Statements
1) Tokens in Python (5 Marks)
Definition
Tokens are the smallest individual units of a Python program.
Types of Tokens
1. Keywords
2. Identifiers
3. Literals
4. Operators
5. Delimiters
Keywords are reserved words in Python.
Identifiers are names given to variables and functions.
Literals are fixed values.
Operators perform operations.
Delimiters separate expressions and statements.
2) Data Types in Python (5 Marks)
Definition
A data type specifies the type of value stored in a variable.
Types of Data Types
1. Numeric
2. String
3. List
4. Tuple
5. Set
6. Dictionary
7. Boolean
Numeric types store numbers.
Strings store characters.
Lists are mutable collections.
Tuples are immutable collections.
Sets store unique values.
Dictionaries store key-value pairs.
Boolean stores True or False.
6) Explain Any 5 Built-in Functions in Python (5 Marks)
1. print() – Displays output
2. input() – Gets user input
3. len() – Returns length
4. type() – Returns datatype
5. sum() – Returns total sum
MODULE II – Introduction to Functions & Modules
3) Types of Arguments in Python (5 Marks)
1. Positional Arguments
2. Keyword Arguments
3. Default Arguments
4. Variable Length Arguments
4) Types of Functions in Python (5 Marks)
1. Built-in Functions
2. User-defined Functions
3. Recursive Functions
4. Anonymous Functions
5. Functions Returning Multiple Values
7) What is Module in Python? (2 Marks)
A module is a file containing Python code such as variables and functions.
8) What is Package in Python? (2 Marks)
A package is a collection of Python modules stored in a folder.
MODULE III – Strings, Lists and Dictionaries
5) Explain String Operations in Python (5 Marks)
String Slicing
Used to extract part of a string.
String Traversal
Accessing characters one by one.
String Splitting
Converts string into list.
String Joining
Combines list elements into string.
12) What is Dictionary in Python? (2 Marks)
A dictionary is a collection of key-value pairs.
MODULE IV – Introduction to Scientific Computing in
Python
9) What is NumPy in Python? (2 Marks)
NumPy is a library used for numerical computations.
10) What is Pandas in Python? (2 Marks)
Pandas is used for data analysis and manipulation.
11) What is Matplotlib in Python? (2 Marks)
Matplotlib is used for plotting graphs and charts.