Skip to main content
  1. Resources/
  2. Study Materials/
  3. Information Technology Engineering/
  4. IT Semester 2/
  5. Advanced Python Programming (DI02016011)/

·
Milav Dabgar
Author
Milav Dabgar
Experienced lecturer in the electrical and electronic manufacturing industry. Skilled in Embedded Systems, Image Processing, Data Science, MATLAB, Python, STM32. Strong education professional with a Master’s degree in Communication Systems Engineering from L.D. College of Engineering - Ahmedabad.
Table of Contents

GUJARAT TECHNOLOGICAL UNIVERSITY
#

Program Name: Diploma in Engineering
#

Level: Diploma
#

Branch: Information Technology
#

Course / Subject Code : DI02016011

Course / Subject Name : Advanced Python Programming

w. e. f. Academic Year:2024-2025
Semester:2 nd
Category of the Course:PCC-02

Prerequisite:

A solid understanding of basic Python concepts including syntax, control flow, functions, and the ability to write basic Python programs

Rationale:

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.

Course Outcome:
#

After Completion of the Course, Student will able to:

NoCourse OutcomesRBT Level
01Develop python programs by applying data structures - dictionary, tuple, and set concepts.Apply
02Develop modules and packages in python programs for modular programming approach.Apply
03Implement error handling techniques using exception handling.Apply
04Develop python programs using file input/output operations.Apply
05Draw graphics using the turtle module.Apply

*Revised Bloom’s Taxonomy (RBT)

GUJARAT TECHNOLOGICAL UNIVERSITY
#

Program Name: Diploma in Engineering
#

Level: Diploma

Branch: Information Technology
#

Course / Subject Code : DI02016011

Course / Subject Name : Advanced Python Programming

Teaching and Examination Scheme:
#

Teaching Scheme (in Hours)Teaching Scheme (in Hours)Teaching Scheme (in Hours)Total Credits L+T+ (PR/2)Assessment Pattern and MarksAssessment Pattern and MarksAssessment Pattern and MarksAssessment Pattern and MarksTotal
LTPRCTheoryTheoryTutorial / PracticalTutorial / PracticalMarks
ESE (E)PA / CA (M)PA/CA (I)ESE (V)
302470302030150

Course Content:
#

Unit No.ContentNo. of Hours% of Weightage
1Basic 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 ● Generator0920
2Modules 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 Module1022

GUJARAT TECHNOLOGICAL UNIVERSITY
#

Program Name: Diploma in Engineering
#

Level: Diploma

Branch: Information Technology
#

Course / Subject Code : DI02016011

Course / Subject Name : Advanced Python Programming

● 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
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 Assertions0818
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 versa1022
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.0818
TotalTotal45100

GUJARAT TECHNOLOGICAL UNIVERSITY
#

Program Name: Diploma in Engineering
#

Level: Diploma
#

Branch: Information Technology
#

Course / Subject Code : DI02016011

Course / Subject Name : Advanced Python Programming

Suggested Specification Table with Marks (Theory):
#

Distribution of Theory Marks (in %)
#

R LevelU LevelA LevelN LevelE LevelC Level
142234---

Where R: Remember; U: Understanding; A: Application, N: Analyze and E: Evaluate C: Create (as per Revised Bloom’s Taxonomy)

References/Suggested Learning Resources:
#

(a) Books:
#

Sr. No.Title of BookAuthorPublication with place, year and ISBN
1Learn Programming in Python with Cody JacksonCody JacksonPackt Publishing, 2018, ISBN : 9781789531947
2Python Basics: A Practical Introduction to Python 3David Amos, Dan Bader et. al.Real Python, 2021 ISBN : 9781775093329
3Introduction to Problem Solving with PythonE. BalagurusamyMc Graw Hill India, New Delhi ISBN: 9789352602582
4Beginning PythonJames PayneWiley, 2010 ISBN: 9780470414637
5Think PythonAllen DowneyO’Reilly, USA, 2016, ISBN : 978-9352134755

(b) Open source software and website:
#

  1. https://www.python.org
  2. https://python-iitk.vlabs.ac.in/
  3. https://python.fossee.in/self_learningcourse/
  4. https://stanfordpython.com/
  5. https://www.programiz.com/python-programming
  6. https://docs.python.org/3/library/turtle.html

GUJARAT TECHNOLOGICAL UNIVERSITY
#

Program Name: Diploma in Engineering
#

Level: Diploma

Branch: Information Technology
#

Course / Subject Code : DI02016011

Course / Subject Name : Advanced Python Programming

Suggested Course Practical List:
#

The following practical outcomes (PrOs) are the subcomponents of the COs. These PrOs need to be attained to achieve the COs.

Sr. No.Practical Outcomes (PrOs)Unit No.Approx. Hrs. required
1Write a program to demonstrate the set functions and operations.12
2i) Write a program to input n numbers from the user and store these numbers in a tuple. Print the maximum and minimum number from this tuple. ii) Create a user-defined function that prints a tuple whose values are the cube of a number between 1 and n (both included), Where n is an integer number and passed as an argument.12
3i) Write a program to count the number of times a character appears in a given string using a dictionary ii) Write a user-defined function to convert a number entered by the user into its corresponding number in words. For example, if the input is 789 then the output should be ’ Seven Eight Nine ‘.12
4Write a program to define a module to find the area and circumference of a circle. i) import the module to another program. ii) import a specific function from a module to another program.22
5Create a package named DemoPackage which contains two modules named mathematics and greets. The mathematics module contains sum, average, power functions, and the greets module contains the sayHello function. i) Import the module from a package to another program. ii) Import a specific function from a module.22
6Install urllib3 package using PIP. Send HTTP requests to any URL and print status for the same.22

GUJARAT TECHNOLOGICAL UNIVERSITY
#

Program Name: Diploma in Engineering
#

Level: Diploma
#

Branch: Information Technology
#

Course / Subject Code : DI02016011

Course / Subject Name : Advanced Python Programming

7Write a program to catch on Divide by zero Exception with finally clause.32
8Write a user-defined exception that could be raised when the text entered by a user consists of less than 10 characters.32
9Write a python program to demonstrate exception handling.32
10i) Write a program to read the content of a file line by line and write it to another file except for the lines containing “a” letter in it. ii) Write a program that inputs a text file. The program should print all of the unique words in the file in alphabetical order.42
11Write a program to create a binary file to store Rollno and Name, Search any Rollno and display name if Rollno found otherwise ‘Rollno not found’.42
12Write a program to demonstrate the file and file I/O operations.42
13i) Draw square, rectangle, and circle using Turtle. ii) Draw color-filled shapes (square, rectangle, and circle) using Turtle.52
14Draw a smiling face emoji and rainbow using Turtle.52
15Draw an Indian Flag and an Olympic Symbol using Turtle52
Total30

Note :-

More Practical Exercises can be designed and offered by the respective course teacher to develop the industry relevant skills/outcomes to match the COs. The above table is only a suggestive list.

List of Laboratory/Learning Resources Required:
#

Sr. No.Laboratory/Learning Resources/Equipment Name with Broad SpecificationsPrO. No.
1Computer system with operating system: Windows 7 or higher version, macOS, and Linux, with 4GB or higher RAM, Python versions: 2.7.X, 3.6.X, or higher version.All

GUJARAT TECHNOLOGICAL UNIVERSITY
#

Program Name: Diploma in Engineering
#

Level: Diploma
#

Branch: Information Technology
#

Course / Subject Code : DI02016011

Course / Subject Name : Advanced Python Programming

Suggested Project List:
#

Only one project is planned to be undertaken by a student that needs to be assigned to him/her in the beginning of the semester. The project could be industry application based, internet-based, workshopbased, laboratory-based or field-based. Each project should encompass two or more COs which are in fact, an integration of PrOs, UOs and ADOs. Each student will have to maintain a dated work diary consisting of individual contributions in the project work and give a seminar presentation of it before submission. The duration of the project should be about 14- 16 (fourteen to sixteen) student engagement hours during the course. The students ought to submit projects by the end of the semester to develop the industry-oriented COs.

A suggestive list of projects is given here. This has to match the COs. Similar projects could be added by the concerned course teacher:

i) Expense Tracker
#

  •  Record expenses with dictionaries, analyze data via modules, handle input errors, and use JSON for storage

ii) Attendance Tracker
#

  •  Track attendance using dictionaries and sets, handle invalid entries, and save data in CSV/JSON files.

iii) Animated Scene
#

  •  Create an animated scene like a sunrise, a bouncing ball, or a moving car using turtle methods.

iv) Tic-Tac-Toe Board
#

  •  Draw a Tic-Tac-Toe grid with turtle graphics and highlight moves using turtle methods.

Suggested Activities for Students:
#

Other than the classroom and laboratory learning, following are the suggested student related cocurricular activities which can be undertaken to accelerate the attainment of the various outcomes in this course: Students should conduct following activities in group and prepare reports of about 5 pages for each activity, also collect/record physical evidences for their (student’s) portfolio which will be useful for their placement interviews:

GUJARAT TECHNOLOGICAL UNIVERSITY
#

Program Name: Diploma in Engineering
#

Level: Diploma
#

Branch: Information Technology
#

Course / Subject Code : DI02016011

Course / Subject Name : Advanced Python Programming

  • a) Build an application using advanced Python concepts, such as a web scraper, chat application, or inventory management system.
  • b) Experiment with libraries like NumPy, pandas, or requests for data analysis, or advanced functionality.
  • c) Work on projects involving API integration to fetch, process, and display data from external sources.
  • d) Engage in Python-specific coding competitions or solve advanced-level problems on platforms like HackerRank, LeetCode, or Codewars.