Course Outline: Introduction to Python
- Familiarity with the Python programming language and associated development tools
- Hands-on experience using various Python data structures, and reading and writing files in Python
- Experience with Object-Oriented design in Python, including polymorphism
- Exposure to Python tools and techniques used to solve problems in real fields such as data science
Course Description
Python is an open source, versatile cross-platform programming language that has a strong presence in diverse software engineering disciplines such as data science, web development, network scripting, and embedded systems. While Python itself may be a deceptively simple language, the vast array of frameworks and tools available for use across a variety of specialized fields make it a formidable tool in the arsenal of any technologist with areas of focus from Machine Learning to Cybersecurity.
This course will provide a pragmatic and hands-on introduction to the Python programming language, with a focus on practical applications and projects, rather than theoretical topics. Students will understand the fundamental concepts required to become a good Python programmer. Throughout the course, they will be exposed to fundamental concepts of Python which shall be covering data structures, file handling and object-oriented programming among others.
Duration
- Self Paced Learning: 10-12 hours
- Instructor Led Sessions: 4 hours
Outline
Module 1 Python Programming
- Introduction
- Python Execution Model
- Installing python for Windows
- Working with a Jupyter Notebook
- Python IDEs and Text Editors
Getting Started
- Variables, Expressions and Statements
- Values and Data Types
- Operators and Operand
- Escape Sequences
- Python Strings
- Triple Quoted Strings
- Getting Input from User
- Selection Statements
- If Statements
- Nested Conditionals
- Repetition Statements
- Augmented Statements
File Handling and Exceptions
- Introduction
- Files
- Standard File Objects
- Text-File Processing
- The with Statement
- Built-in Function open
- os Module File Processing Functions
- Handling Exceptions
- Division by Zero
- Invalid Input
- try Statements
- try Clause
- except Clause
- else Clause
- finally Clause
- Explicitly Raising an Exception
Module 2 Python Programming
Functions
- Function Definition
- Functions with multiple parameters
- Defining a custom Function
- Calling a Function
- Defining a Function with an Arbitrary Argument List
- Methods
- Scope Rules
- Passing Arguments to Functions
Python Data Structures
- Lists
- Tuples
- Unpacking Sequences
- Sequence slicing
- del Statement
- Passing lists to Functions
- List Comprehensions
- Filter, Map and Reduce
- 2-D Lists
- Dictionary
- Sets
Array Oriented Programming with Numpy
- Array attributes
- Filling Arrays with specific values
- Universal Functions
- Views
- Reshaping and Transposing
Strings – A Deeper Look
- Formatting Strings
- Concatenating and Repeating Strings
- Stripping Whitespace
- Changing character case
- Comparison operator for strings
- Searching for Substrings
- Splitting and Joining strings
- Raw Strings
Object Oriented Programming
- Introduction
- Custom Class Account
- Properties for Data Access
- Inheritance: Base Classes and Subclasses
- Operator Overloading
- Named Tuples
- Namespaces and Scopes
Note: Practice Jupyter Notebook shall be provided for practice with each module