Skip to main content
  1. Resources/
  2. Study Materials/
  3. Information Technology Engineering/
  4. IT Semester 2/

15 mins· ·
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 (GTU)
#

Competency-focused Outcome-based Green Curriculum-2021 (COGC-2021) Semester - II
#

Course Title: Advanced Python Programming
#

(Course Code: 4321602)

Diploma programme in which this course is offeredSemester in which offered
Information TechnologySecond

1. RATIONALE
#

In previous semester (Semester I) students have learned 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.

2. COMPETENCY
#

The purpose of this course is to help the student to attain the following industry identified competency through various teaching-learning experiences:

  • Develop a program using advanced python language concepts to solve the given problem.

3. COURSE OUTCOMES (COs)
#

The practical exercises, the underpinning knowledge, and the relevant soft skills associated with this competency are to be developed in the student to display the following COs:

The student will develop underpinning knowledge, adequate programming skills of competency for implementing various applications using python programming language to attain the following course outcomes.

  • a) Develop python programs by applying data structures - dictionary, tuple, and set concepts.

  • b) Develop modules and packages in python programs for modular programming approach.

  • c) Implement error handling techniques using exception handling.

  • d) Develop python programs using file input/output operations.

  • e) Draw graphics using the turtle module.

4. TEACHING AND EXAMINATION SCHEME
#

Teaching SchemeTeaching SchemeTeaching SchemeTotal Credits (L+T/2+P/2)Examination SchemeExamination SchemeExamination SchemeExamination SchemeExamination Scheme
(In Hours)(In Hours)(In Hours)Total Credits (L+T/2+P/2)Theory MarksTheory MarksPractical MarksPractical MarksTotal Marks
LTPCCAESECAESETotal Marks
3-4530702525150

(*): Out of 30 marks under the theory CA, 10 marks are for assessment of the micro-project to facilitate integration of COs and the remaining 20 marks is the average of 2 tests to be taken during the semester for the assessing the attainment of the cognitive domain UOs required for the attainment of the COs .

Legends: L -Lecture; T - Tutorial/Teacher Guided Theory Practice; P -Practical; C - Credit, CA -Continuous Assessment; ESE -End Semester Examination.

5. SUGGESTED PRACTICAL EXERCISES
#

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

S. No.Practical Outcomes (PrOs)Unit No.Approx. Hrs. required
1Write a program to demonstrate the set functions and operations.I02
2Write 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.I02
3Create 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.I02
4Write a program to input names of n employees and store them in a tuple. Also, input a name from the user and find if this employee is present in the tuple or not.I02
5Write a program to demonstrate tuples functions and operationsI02
6Create a dictionary with the roll number, name, and marks of n students in a class and display the names of students who have scored marks above 75.I02
7Write a program to count the number of times a character appearsI02
in a given string using a dictionary.
8Write 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 ‘.I02
9Write a program to concatenate the following dictionaries to create a new one. Sample Dictionary: dic1={1:10, 2:20} dic2={3:30, 4:40} dic3={5:50,6:60} Expected Result: {1: 10, 2: 20, 3: 30, 4: 40, 5: 50, 6: 60}I02
10Write a program to demonstrate the dictionaries functions and operations.I02
11Write a program to define a module to find the area and circumference of a circle. a) import the module to another program. b) import a specific function from a module to another program.II02
12Create 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. a) import the module from a package to another program. b) import a specific function from a module.II02
13Install urllib3 package using PIP. Send HTTP requests to any URL and print status for the same.II02
14Write a program to catch on Divide by zero Exception with finally clause.III02
15Write a user-defined exception that could be raised when the text entered by a user consists of less than 10 characters.III02
16Write a python program to demonstrate exception handling.III02
17Write a program to read the content of file line by line and write itIV02
to another file except for the lines containing “a” letter in it.
18Write a program that inputs a text file. The program should print all of the unique words in the file in alphabetical order.IV02
19Write 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’.IV04
20Write a program to demonstrate the file and file I/O operations.IV02
21Draw square, rectangle, and circle using Turtle.V02
22Draw color-filled shapes (square, rectangle, and circle) using Turtle.V02
23Draw a smiling face emoji and rainbow using Turtle.V04
24Draw an Indian Flag and an Olympic Symbol using TurtleV04
25Draw a chessboard using Turtle.V02
Total56

Note
#

  • i. 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 .
  • ii. The following are some sample ‘Process’ and ‘Product’ related skills (more may be added/deleted depending on the course) that occur in the above listed Practical Exercises of this course required which are embedded in the COs and ultimately the competency..
S. No.Sample Performance Indicators for the PrOsWeightage in %
1Identify suitable approach to implement logic25
2Use pre-built packages/functions20
3Use python concepts to implement efficient program25
4Follow different input test cases to check output10
5Identify and mend coding errors in a program / Interpret the result and conclude20
TotalTotal100

6. MAJOR EQUIPMENT/ INSTRUMENTS REQUIRED
#

These major equipment with broad specifications for the PrOs is a guide to procure them by the administrators to usher in uniformity of practicals in all institutions across the state.

S. No.Equipment Name with Broad SpecificationsPrO. No.
1Computer system with operating system: Windows 7 or higher Ver., macOS, and Linux, with 4GB or higher RAM, Python versions: 2.7.X, 3.6.XAll
2Python IDEs and Code Editors Open Source : IDLE, Jupyter

7. AFFECTIVE DOMAIN OUTCOMES
#

The following sample Affective Domain Outcomes (ADOs) are embedded in many of the above-mentioned COs and PrOs. More could be added to fulfill the development of this competency.

  • a) Work as a leader/a team member.
  • b) Follow ethical practices.

The ADOs are best developed through the laboratory/field based exercises. Moreover, the level of achievement of the ADOs according to Krathwohl’s ‘Affective Domain Taxonomy’ should gradually increase as planned below:

  • i. ‘Valuing Level’ in 1 st year
  • ii. ‘Organization Level’ in 2 nd year.
  • iii. ‘Characterization Level’ in 3 rd year.

8. UNDERPINNING THEORY
#

Only the major Underpinning Theory is formulated as higher-level UOs of Revised Bloom’s taxonomy in order development of the COs and competency is not missed out by the students and teachers. If required, more such higher-level UOs could be included by the course teacher to focus on the attainment of COs and competency.

UnitUnit Outcomes (UOs) (4 to 6 UOs at Application and above level)Topics and Sub-topics
Unit - I Basic of python data structure - Dictionary, Tuple and Set1.1 Use of String and list operations in python programs. 1.2 Use built-in functions for Set manipulation. 1.3 Use of Tuple operations in python programs. 1.4 Use built-in functions for Dictionary manipulation.1.1.1 Introduction to Strings, Lists 1.2.1 Set ● Sets in Python ● Create a Set, Accessing Python Sets, Delete from sets, Update sets ● Python Set Operations 1.3.1 Tuple ● Tuples in Python ● Creating Tuples ● Accessing Tuple ○ Iterate over tuples ○ Slicing tuples ● Tuples are Immutable ● Python Tuple Operations ● Built-In Tuple Functions and methods 1.4.1 Dictionary ● Dictionaries in Python ● Creating Dictionaries ● Accessing Items in Python Dictionaries ● Add, Update, Remove in Dictionaries ● Properties of Dictionary Keys ● Built-In Dictionary Methods and functions
Unit - II Modules and Packages2.1 Describe creating and importing module 2.2 Describe creating and importing package 2.3 PIP - Package Installer for Python2.1.1 Introduction to module 2.1.2 Creating user defined module 2.1.3 Importing a module in python ● Normal import ● From import ● From import with * 2.1.4 Module search path 2.2.1 Introduction to Packages 2.2.2 Creating user defined package 2.2.3 Importing a package in python ● Normal import
● From import ● From import with * 2.2.4 Intra-package References 2.3.1 Installing PIP 2.3.2 Installing/uninstalling python packages
Unit- III Exception handling3.1 Explain errors & exceptions 3.2 List types of Exceptions 3.3 Implement Raising Exceptions 3.4 Implement Handling Exceptions3.1.1 Introduction to Exception 3.2.1 Types of Exceptions : ● Built-in Exceptions ● User defined Exceptions 3.3.1 Raising Exceptions 3.4.1 Handling Exceptions ● Try clause ● Except clause ● Finally clause
Unit- IV Files Handling4.1 List types of file 4.2 Explain basics of file creation, reading and writing in context to file handling. 4.3 Explain setting file offsets 4.4 Explain Object Serialization.4.1.1 Introduction to files and its types. ● Binary files ● Text files 4.2.1 Opening and Closing Text File 4.2.2 Reading and Writing Files 4.3.1 Setting Offsets in File 4.4.1 Object Serialization - Pickle Module
Unit- V Graphics with Turtle5.1 Explain turtle graphics module 5.2 Implement graphics using turtle 5.3 Use loops and conditional statements to draw graphics5.1.1 Introduction to turtle graphics 5.2.1 Turtle methods 5.2.2 TurtleScreen Methods 5.3.1 Turtle programming - loops and conditional statements.

Note : The UOs need to be formulated at the ‘Application Level’ and above of Revised Bloom’s Taxonomy’ to accelerate the attainment of the COs and the competency.

9. SUGGESTED SPECIFICATION TABLE FOR QUESTION PAPER DESIGN
#

Unit No.Unit TitleTeaching HoursDistribution of Theory MarksDistribution of Theory MarksDistribution of Theory MarksDistribution of Theory Marks
Unit No.Unit TitleTeaching HoursR LevelU LevelA LevelTotal Marks
IBasic of python data structure - Dictionary, Tuple and Set1004060818
IIModules and Packages0802040612
IIIException handling0802060614
IVFiles Handling0804040614
VGraphics with Turtle0802020812
TotalTotal4214223470

Legends: R=Remember, U=Understand, A=Apply and above (Revised Bloom’s taxonomy)

Note : This specification table provides general guidelines to assist students for their learning and to teachers to teach and question paper designers/setters to formulate test items/questions assess the attainment of the UOs. The actual distribution of marks at different taxonomy levels (of R, U and A) in the question paper may vary slightly from the above table.

10. SUGGESTED STUDENT ACTIVITIES
#

Other than the classroom and laboratory learning, following are the suggested studentrelated co-curricular 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:

  • a) Prepare a document which differentiates python versions.
  • b) Undertake micro-projects in teams
  • c) Give a seminar on any relevant topics.
  • d) Undertake a market survey of different python frameworks.

11. SUGGESTED SPECIAL INSTRUCTIONAL STRATEGIES (if any)
#

These are sample strategies, which the teacher can use to accelerate the attainment of the various outcomes in this course:

  • a) Massive open online courses ( MOOCs ) may be used to teach various topics/subtopics.
  • b) Guide student(s) in undertaking micro-projects.
  • c) ‘L’ in section No. 4 means different types of teaching methods that are to be employed by teachers to develop the outcomes.
  • d) About 20% of the topics/sub-topics which are relatively simpler or descriptive in nature is to be given to the students for self-learning , but to be assessed using different assessment methods.
  • e) With respect to section No.11 , teachers need to ensure to create opportunities and provisions for co-curricular activities .
  • f) Guide students for open source python editors.

12. SUGGESTED MICRO-PROJECTS
#

Only one micro-project is planned to be undertaken by a student that needs to be assigned to him/her in the beginning of the semester. In the first four semesters, the micro-project are group-based. However, in the fifth and sixth semesters, it should be preferably be individually undertaken to build up the skill and confidence in every student to become problem solver so that s/he contributes to the projects of the industry. In special situations where groups have to be formed for micro-projects, the number of students in the group should not exceed three.

The micro-project could be industry application based, internet-based, workshopbased, laboratory-based or field-based. Each micro-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 total duration of the micro-project should not be less than 16 (sixteen) student engagement hours during the course. The student ought to submit a micro-project by the end of the semester to develop the industry oriented COs.

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

  • Case Study 1: Create an English dictionary that is able to perform the following function.
  • i) Add a word and its meaning.
  • ii) Delete a word and its meaning.
  • iii) Update word or it’s meaning.
  • iv) Print a list of word and their meaning.
  • Case Study 2: Build the famous snake game with python’s turtle module.
  • Case Study 3: Draw the famous cartoon character Doraemon, Shinchan with Turtle module

13. SUGGESTED LEARNING RESOURCES
#

S. 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, 2017 ISBN: 9789352602582
4Beginning PythonJames PayneWiley, 2010 ISBN: 9780470414637
5Think PythonAllen DowneyO’Reilly, USA, 2016, ISBN : 978- 9352134755

14. SOFTWARE/LEARNING WEBSITES
#

15. PO-COMPETENCY-CO MAPPING
#

Semester IIAdvanced Python Programming (Course Code: 4321602 )Advanced Python Programming (Course Code: 4321602 )Advanced Python Programming (Course Code: 4321602 )Advanced Python Programming (Course Code: 4321602 )Advanced Python Programming (Course Code: 4321602 )Advanced Python Programming (Course Code: 4321602 )Advanced Python Programming (Course Code: 4321602 )Advanced Python Programming (Course Code: 4321602 )Advanced Python Programming (Course Code: 4321602 )Advanced Python Programming (Course Code: 4321602 )
Competency & Course OutcomesPO 1 Basic & Discipline specific knowledgPO 2 Probl em Analy sisPO 3 Design/ develop ment of solutio nsPO 4 Engineering Tools, Experiment ation &TestingPO 5 Engineering practices for society, sustainability & environmentPO 6 Project Manag ementPO 7 Life- long learnin gPSO 1PSO 2PSO 3 (If neede d)
Competency Develop a program using advanced python language concepts to solve the given problem.
Course Outcomes CO a) Develop python programs by applying Python data structures - dictionary, tuple and set concepts..3232-23
CO b) Develop modules and packages in Python programs for modular programming approach.3232-23
CO c) Implement error handling techniques using exception handling.3232-33
CO d) Develop python programs using File Input/output operations.3232-33
CO e) Draw graphics using turtle module3333-33

Legend: ’ 3’ for high, ’ 2 ’ for medium, ‘1’ for low or ‘-’ for the relevant correlation of each competency, CO, with PO/ PSO

16. COURSE CURRICULUM DEVELOPMENT COMMITTEE
#

GTU Resource Persons
#

S. No.Name and DesignationInstituteEmail
1Prof (Dr.) Parvez FarukiHOD-I.T. AVPTI,RajkotParvezfaruki.kg@gmail.c om
1Prof. Nandu A. FatakHOD-I.T. LEC Poly Morbinandu_fatak@yahoo.co m
2Ms. Ayesha S. ShaikhR.C.Technical Institute, Ahmedabadshaikh.ayesha0014@gm ail.com
3Mr. Pradipsinh K. ChavdaLEC Poly. Morbipradipchavda.it@gmail.c om