Python Programming (Course Code: DI01016011)

GUJARAT TECHNOLOGICAL UNIVERSITY

Program Name: Diploma in Engineering Level: Diploma

Branch: Information Technology

FieldDetails
w.e.f. Academic Year:2024-2025
Semester:1st
Category of the Course:PCC
Prerequisite:Basic computer skills, including the ability to write basic statements and expressions.
Rationale:Computer programming skills are now becoming part of basic education as these skills are increasing of vital importance for future job and career prospects. The Python programming language is one of the most popular programming languages worldwide. The course emphasizes the use of python programming in multiple domains. Python is a modern language for writing compact codes specifically for programming Server-side web apps, Data Analytics and Machine Learning, an important Artificial Intelligence domain. Furthermore, Python has gained popularity in scientific computing, production tools and game programming. This course focuses on developing python programming to do a variety of programming tasks where the students are encouraged to develop basic applications using different open source tools. At the end of the course, the student will be developing adequate basic programming skills using python language.

Course Outcomes

After completion of the course, students will be able to:

No.Course OutcomesRBT Level
CO1Prepare flowchart and algorithm for solving computing problems.Apply
CO2Develop python programs to solve simple problems.Apply
CO3Apply control structure feature of python for developing programs.Apply
CO4Develop programs in Python using built-in functions, modules, and library functions.Apply
CO5Develop python programs applying strings and lists manipulation concepts.Apply

*RBT: Revised Bloom's Taxonomy

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
1Problem Solving using Flowchart and Algorithm
1.1 Introduction, Steps for problem-solving, Algorithm and its characteristics, Importance of algorithm.
1.2 Symbolic representation of a flowchart, Importance and Limitations of flowchart, Flow of control
1.3 Problem solving using pseudocode
0511
2Basics of Python
2.1 Introduction to python, Python features, Applications of python programming
2.2 Python installation
2.3 Basic structure of python program, Python Comments, Keywords, identifiers, variables, Data types, and Operators.
2.4 Type Conversion
1017
3Flow of Control
3.1 Introduction to Flow of Control
3.2 Selection
• If statement
• Elif statement
• Nested if statement
• match statement
3.3 Repetition
• For loop
• While loop
• Nested loop
3.4 break, continue, and pass Statements
1024
4Functions
4.1 Introduction to Functions
4.2 User Defined Functions
• Arguments and Parameters
4.3 Scope of a Variable
• Global Variable
• Local Variable
Python Standard Library
• Built-in functions
• Input or output - input(), print()
• Mathematical Functions - abs(), divmod(), max(), min(), pow(), sum()
• Module
  ○ math
  ○ random
  ○ statistics
1024
5Strings and Lists
5.1 Introduction to Strings, String Operations, Traversing a String
5.2 Strings Methods and Built-in Functions
5.3 Introduction to List and its Operations
5.4 List Methods and Built-in Functions
• Nested and Copying Lists
5.5 List as Arguments to Function
1024
Total45100

Suggested Specification Table with Marks (Theory)

Distribution of Theory Marks (in %)

R LevelU LevelA LevelN LevelE LevelC Level
232849---

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 websites

  1. Python.org - Official Python website
  2. Learn Python.org - Interactive Python tutorial
  3. Hackr.io Python Tutorials - Curated Python learning resources
  4. SoloLearn Python Course - Mobile-friendly Python course
  5. NPTEL - National Programme on Technology Enhanced Learning

Suggested Course Practical List

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

Sr. No.Practical Outcomes (PrOs)Unit No.Approx. Hrs. Required
1Prepare flowchart and algorithm for a given problem.
• Find the sum of two given numbers.
• Find a maximum out of two given numbers.
• Find whether a given number is odd or even.
• Find a maximum out of three given numbers.
12
2Install & configure python software and Create a program to print your name, date of birth and mobile number.22
3Develop a program to identify data-types in python.22
41) Create a program to read three numbers from the user and find the average of the numbers.
2) Create a program to convert temperature from Fahrenheit to Celsius unit using eq: C=(F-32)/1.8
22
51) Create a program to identify whether the scanned number is even or odd and print an appropriate message.
2) Create a program to find a maximum number among the given three numbers.
32
6Develop a program to show whether the entered number is prime or not.32
7Develop a program to print odd and even numbers from 1 to N numbers. (Where N is an integer number entered by the user)32
8Develop a program to demonstrate the use of break, continue and pass statements.32
91) Develop a user-defined function to find the factorial of a given number.
2) Create a user-defined function to print the Fibonacci series of 0 to N numbers. (Where N is an integer number and passed as an argument)
42
10Write a program using the function that reverses the entered value.42
11Write a program that determines whether a given number is an Armstrong number or not using a user-defined function.42
121) Write a program to reverse words in a given sentence.
2) Write a program to check if a substring is present in a given string.
3) Write a program to count and display the number of vowels, consonants, uppercase, lowercase characters in a string.
52
131) Create a program to find the sum of all elements in a list using a loop.
2) Create a program to find the smallest and largest element in a given list.
53
14Given a list saved in variable: a = [1, 8, 7, 15, 25, 36, 48, 64, 81, 95]. Write a Python program that takes this list and makes a new list that has only the even elements of this list in it.53
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 Ver., macOS, and Linux, with 4GB or higher RAM, Python versions: 2.7.X, 3.6.X, or higher Ver.All
2Python IDEs and Code Editors - Open Source: IDLE, Jupyter2 to 14

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, workshop-based, 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:

  1. Develop a console based application to convert number systems (i.e., Binary to Decimal, Binary to Octal, etc.)
  2. Develop a simple calculator.
  3. Develop console based Countdown timer.
  4. Print number system table for given range (Decimal | Binary | Octal | Hexadecimal)
  5. Develop a fizz-buzz game.
  6. Develop a program to generate random passwords (8 Digits).

Suggested Activities for Students

Other than the classroom and laboratory learning, following are the suggested student-related co-curricular activities which can be undertaken to accelerate the attainment of the various outcomes in this course:

Students should perform following activities in group and prepare reports of about 5 pages for each activity. They should also collect/record physical evidences for their (student's) portfolio which may be useful for their placement interviews:

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