DI02016011 · Semester 2 · 5G scheme
Advanced Python Programming
Notes and solutions following the Gujarat Technological University (GTU) syllabus for DI02016011. Independent material — not issued by the university.
Materials
Complete Book
The whole syllabus, unit by unit, written for the exam.
Complete Book
177 pages
Premium Preview · 14 pages
Problem Solver
Step-by-step solutions to typical problems.
Problem Solver
32 pages
Premium Preview · 4 pages
Syllabus units
Unit 1: Basic of python data structure - Dictionary, Tuple and Set
- 1.1 Introduction to Strings, Lists
- 1.2 Set
- • Create a Set, Accessing Python Sets, Delete from sets, Update sets
- • Python Set Operations
- 1.3 Tuple
- • Creating Tuples, Accessing Tuple, Iterate over tuples, Slicing tuples
- • Tuples are Immutable, Python Tuple Operations
- • Built-In Tuple Functions and methods
- 1.4 Dictionary
- • Creating Dictionaries, Accessing Items in Python Dictionaries
- • Add, Update, Remove in Dictionaries, Properties of Dictionary Keys
- • Built-In Dictionary Methods and functions
- 1.5 Comprehensions
- • List • Dictionary • Set • Generator
Unit 2: Modules and Packages
- 2.1 Introduction to module
- 2.2 Creating user defined module
- 2.3 Importing a module in python
- • Normal import • From import • From import with *
- 2.4 Module search path
- 2.5 OS Module
- • Handling the current working directory
- • Creating a directory
- • Listing out files and directories
- 2.6 Introduction to Packages
- 2.7 Creating user defined package
- 2.8 Importing a package in python
- • Normal import • From import • From import with *
- 2.9 Intra-package References
- 2.10 Installing PIP
- 2.11 Installing/uninstalling python packages
Unit 3: Exception Handling
- 3.1 Introduction to Exception
- 3.2 Types of Exceptions:
- • Built-in exceptions • User defined exceptions
- 3.3 Raising Exceptions
- 3.4 Handling Exceptions
- • Try clause • Except clause • Finally clause
- 3.5 Python Assertions
Unit 4: Files Handling
- 4.1 Introduction to files and their types.
- • Binary files • Text files
- 4.2 Opening and Closing Text File
- 4.3 Handle file using "with" statement
- 4.4 Reading and Writing Files
- 4.5 Setting Offsets in File
- 4.6 Object Serialization - Pickle Module
- 4.7 Introduction to Python JSON
- • JSON text format
- • Conversion from JSON to Python object vice versa
Unit 5: Graphics with Turtle
- 5.1 Introduction to turtle graphics
- 5.2 Turtle methods
- 5.3 Turtle Screen Methods
- 5.4 Turtle programming - loops and conditional statements.
About this course
In the previous semester (Semester I) students have learned the basics of python programming. They understand developing programs to solve simple problems using various features of the 'Python' language. Python is a modern language useful for writing compact codes specifically for programming in the area of Server-side Web development, Data Analytics, AI, and scientific computing as well as production tools and game programming. This course deals with some advanced features of the 'Python' language. The programming skills thus acquired can be used for developing programs with advanced level programming features which in turn will be helping in developing practical applications for the scientific, research and business purposes. At the end of the course, the student will be able to develop programs with adequate advanced concepts using python language.