Basic Python Programming
Duration: 2 days
Santanu Chatterjee
Program Outline & Description s
Objective:
1. After the training, participants should be able to approach any programming problem
using the python programming language
2. Participants will be able to create and understand existing reusable python classes,
error handling, and usage of different inbuilt modules in Python in appropriate
circumstances.
Prerequisites - s
Basic knowledge of programming is expected in any language. For those with zero programming
knowledge, they need to watch first two videos of https://www.youtube.com/watch?v=k6U-
i4gXkLM&list=PL38986218EEA17EB3
Course Contents - s
Module 1: Introduction to Python
• Introduction to Python
• Features of Python
• Why Python
Module 2: Simple Program
• Python shell
• Python command
• Prepare source File and execute the code
• Print “Hello World”
• Comments
• Help command
Module 3: Basic Language Constructs
• Data types and Variables
• String type
• Format method
• Operators and Expressions
Basic Python • Indentation
Module 4: Data Structures
• List
• Tuple
• Dictionary
• Set
• Numpy arrays
• Array operations
• Advanced slicing
Module 5: Functions
• Simple Function declaration
• Function with parameter
• Variable Scope
• The “global” statement
• Function with default and keyword arguments
• Function with no return
• Anonymous function
• Introduction to lambda
Module 6: Control Structure
• If
• While loop
• For loop
• Break & Continue Statements
Module 7: Files
• What is File Input output?
• How to open a file
• How to close a file
• Read and write data to a file
Assignments
End of Day 1
Module 8: More on lists
• Higher order functions
• map, filter, reduce
• Usage of lambda
• List comprehension
• Filtered list comprehension
Module 9: String Manipulation
• String functions
• Case changing
• Checks in strings
• Formatting
• Tokenizing
Module 10: Modules
• What is module?
Intermediate Python • Use of modules
• Import statement
• The dir() Function
• Importing specific function
• Placing the module
Module 11: Object Oriented Programming
• Introduction to object oriented concepts
• Classes and Objects
• The “self” and __init__
• Difference between __new__ and __init__
• Methods and Attributes
• Special builtins
• Storing objects in files
Module 12: Exception Handling
• Why exception Handling
• try…except block
• Raising your own exceptions
• else block
• finally
• Creating own exception class
Assignments
End of Day 2