<!-- image -->

## GUJARAT TECHNOLOGICAL UNIVERSITY

Program Name: Diploma Engineering Level: Diploma

## Branch: Computer Engineering / Computer Science and Engineering

/ Cyber System and Information Security Subject Code : DI02000101

Subject Name : Scripting Language

W.E. F. Academic Year:

2024-2025

Semester:

2 nd

Category of the Course:

PCC

| Prerequisite:   | Basic computer literacy, Logical Thinking and Basic Mathematics                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
|-----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Rationale:      | Python  is  an  open-source,  high-level  programming  language  known  for  its  simplicity and versatility, making it one of the most popular languages worldwide.  Renowned for its straightforward syntax and extensive library ecosystem, Python  is  used  across  a  broad  range  of  fields,  including  automation,  server-side  web  development,  tools  development,  game  programming,  block  chain,  data  science,  artificial  intelligence,  machine  learning,  and  big  data,  among  others.  Its  accessibility makes it easy to learn, while its power and flexibility make it suitable  for  diverse  applications.  This  course  is  designed  to  teach  the  fundamentals  of  Python programming, focusing on using core Python constructs to solve a variety  of  problems.  By  the  end  of  the  course,  students  will  be  able  to  create  simple  applications  using  Python,  providing  them  with  a  strong  foundation  to  explore  Python's advanced applications across these many domains. |

## Course Outcome:

After Completion of the Course, Student will able to:

| No                                                                                                                                                    | Course Outcomes                                                            | RBT Level   |
|-------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------|-------------|
| Create  and  implement  basic  Python  programs  by  utilizing  suitable  data  types,  constants, and literals.                                      | Apply                                                                      | 01          |
| Apply operators and control flow structures  to  design  and  implement  solutions  for the given problems.                                           | Apply                                                                      | 02          |
| Utilize  data  structures  such  as  lists,  tuples,  sets,  and  dictionaries  to  develop  efficient solutions for the given problems.              | Apply                                                                      | 03          |
| Apply  Python's  built-in  functions,  file  handling  features,  and  user-defined  functions to develop effective solutions for the given problems. | Apply                                                                      | 04          |
| 05                                                                                                                                                    | Apply Python modules and packages to efficiently solve the given problems. | Apply       |

*Revised Bloom's Taxonomy (RBT)

<!-- image -->

## GUJARAT TECHNOLOGICAL UNIVERSITY

Program Name: Diploma Engineering Level: Diploma

Branch: Computer Engineering / Computer Science and Engineering / Cyber System and Information Security

Subject Code : DI02000101

Subject Name : Scripting Language

## 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 Marks   | Assessment Pattern and Marks   | Assessment Pattern and Marks   | Assessment Pattern and Marks   | Total   |
|-------------------------------|-------------------------------|-------------------------------|-------------------------------|--------------------------------|--------------------------------|--------------------------------|--------------------------------|---------|
| L                             | T                             | PR                            | C                             | Theory                         | Theory                         | Tutorial / Practical           | Tutorial / Practical           | Marks   |
|                               |                               |                               |                               | ESE  (E)                       | PA / CA  (M)                   | PA/CA (I)                      | ESE  (V)                       |         |
| 3                             | 0                             | 2                             | 4                             | 70                             | 30                             | 20                             | 30                             | 150     |

## Course Content:

|   Unit  No. | Content                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |   No. of  Hours |   % of  Weightage |
|-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------|-------------------|
|           1 | Introduction and Syntax of Python Programming: Introduction to Python, History of Python, Python Features, Python  Applications, Installing Python, Basic Structure of Python program,  Keywords and Identifiers,    Variables,  Type  Casting,  Input-Output  functions: input, print, Data types: Number, String, Set, Tuple, List  and  Dictionary,  Declaration  and  use  of  data  types,  Literals,  Constants, Identifiers  Program Solving practice on the above concept |              07 |                15 |
|           2 | Operators and Control Flow Structures: Basic  Operators :  Arithmetic,  Logical,  Comparison,  Assignment,  Bitwise,  Membership,  Identity  Operator,  Python  Operator  Precedence    Control  Flow:   Concept  of  Indentation  and  if,  if...else,  if…el  if…else  statement  with  examples,  While  loop,  for  loop,  range  ()  function, break and continue, pass & return statements and Nesting  of loops  Program Solving practice on the above concept             |              08 |                18 |

<!-- image -->

## GUJARAT TECHNOLOGICAL UNIVERSITY

Program Name: Diploma Engineering Level: Diploma

Branch: Computer Engineering / Computer Science and Engineering

/ Cyber System and Information Security Subject Code : DI02000101

Subject Name : Scripting Language

|   3. | Data Structure in Python:  Lists:  Defining Lists, accessing values in Lists, deleting values in  Lists, updating values in Lists, Basic List operations, Built in List  functions  Tuples:   Defining  Tuples,  accessing  values  in  Tuples,  deleting  values  in  Tuples,  updating  values  in  Tuples,  Basic  Tuple  operations, Built in Tuple functions  Sets:  Defining  Sets,  accessing  values  in  Sets,  deleting  values  in  Sets,  updating  values  in  Sets,  Basic  Sets  operations,  Built  in  Sets  functions  Dictionaries:  Defining Dictionary, accessing values in Dictionary,  deleting values in Dictionary, updating values in Dictionary, Basic  Dictionary operations, Built in Dictionary functions  Program Solving practice on the above concept                                                                                                                                                                                                                                                                                                                |   08 |   18 |
|------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------|------|
|    4 | Python Functions and File Handling Functions  Built-in  Functions   -  Type/  Data  Conversion  functions-   int(),  float(), str(),  bool(), list(), tuple(), dict(), set(), frozenset(), bytes(),  bytearray(),  complex(),  math  functions -  abs(),  round(),  pow(),  divmod(), sum(), min(), max() and  String functions - len(), max(),  min(),  isalnum(),  isalpha(),  isdigit(),  isidentifier(),  islower(),  isupper(),  and  isspace(),  endswith(),  startswith(),  find(),  rfind(),  count(), capitalize(), lower(), upper(), title(), swapcase(), replace(),  lstrip(), rstrip(), strip(), format(), center(), ljust(), rjust()  File  handling  Functions -  read(),  readline(),  readlines(),Writing  functions: write(), append(), writelines()   User  defined  Functions:   Introduction  to  Python  User  defined  Function, function definition,  function  calling,  Passing  parameters  to  a  function  and  returning  values  from  a  function,  Recursion,  Scope of variables- Local variable and Global variable   Program Solving practice on the above concept |   12 |   27 |

<!-- image -->

## GUJARAT TECHNOLOGICAL UNIVERSITY

Program Name: Diploma Engineering Level: Diploma

## Branch: Computer Engineering / Computer Science and Engineering

/ Cyber System and Information Security Subject Code : DI02000101

Subject Name : Scripting Language

| 5.   | Python Modules and Packages   Modules:  Introduction  to  python  module, Writing  Module,  Importing  Module  ,  importing  objects  from  module,  Built-in  Modules- Numeric and Mathematic module  Packages:   Introduction to Packages, Writing Packaging,   Matplotlib  Package:-   plot(),show(),  xlabel(),  ylabel(),grid(),bar(),  hist(), subplot(), pie(), savefig()   |   10 |   22 |
|------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------|------|
|      | Total                                                                                                                                                                                                                                                                                                                                                                              |   45 |  100 |

## Suggested Specification Table with Marks (Theory):

## Distribution of Theory Marks (in %)

|   R Level |   U Level |   A Level |   N Level |   E Level |   C Level |
|-----------|-----------|-----------|-----------|-----------|-----------|
|        12 |        16 |        42 |         0 |         0 |         0 |

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:

1. Charles  Dierbach,  'Introduction  to  Computer  Science  Using  Python:  A  Computational Problem-Solving  Focus',  John  Wiley  &amp;  Sons  (25  January  2013),  ISBN-10:  0470555157, ISBN-13: 978-0470555156
2. John Zelle, 'Python Programming: An Introduction to Computer Science', Franklin, Beedle &amp; Associates Inc; Pap/Cdr edition (1 December 2003), ISBN-10 : 1590280288, ISBN-13 : 9781887902991
3. Liang  Y.  Daniel,  'Introduction  to  Programming  Using  Python',  Pearson  Education;  First edition (26 February 2017), ISBN-10: 9332551847, ISBN-13: 978-9332551848
4. R. Nageswara Rao, 'Core Python Programming', Dreamtech Press (1 September 2021), Delhi; ISBN-10: 9390457157, ISBN-13: 978-9390457151
5. Paul Barry, 'Head First Python', Shroff/O'Reilly; Second edition (1 December 2016)., ISBN10: 9789352134823, ISBN-13: 978-9352134823

<!-- image -->

## GUJARAT TECHNOLOGICAL UNIVERSITY

Program Name: Diploma Engineering Level: Diploma

## Branch: Computer Engineering / Computer Science and Engineering

/ Cyber System and Information Security Subject Code : DI02000101

Subject Name : Scripting Language

6. Lutz  M,  'Learning  Python',  Shroff;  Fifth  edition  (1  January  2013),  ISBN-10:7301152519, ISBN-13:7301152519-799

## (b) Open source software and website:

1. https://www.python.org
2. https://www.learnpython.org
3. https://www.python-course.eu
4. https://nptel.ac.in
5. https://www.youtube.com
6. https://www.edx.org
7. https://www.coursera.org/in
8. https://www.udemy.com
9. https://www.programiz.com/python-programming/online-compiler/
10. https://www.onlinegdb.com/online\_python\_compiler
11. https://www.online-python.com

## Suggested Course Practical List:

1. Install  and  configure  the  Python  environment.  Run  basic  Python  commands  to  verify  the Python environment.
2. Design and Test Python program to read your name, contact number, email, and birth-date and print those details on the screen.
3. Design and Test Python Program to perform create access, update and delete operation on List, Tuple, Sets and Dictionary.
4. Design  and  Test  Python  Program  to  demonstrate  use  of  conditional  statements:  if,  if...else, if…elif…else statement.
5. Design  and  Test  Python  Program  to  demonstrate  use  of  Operators:  Arithmetic,  Logical, Comparison, Assignment, Bitwise, Membership and Identity Opera tor.
6. Design  and  Test  Python  Program  to  demonstrate  use  of  looping  statement:  while,  for,  and Nested loop.
7. Design and test a Python program using user defined function for given problem.
8. Design and Test Python Program to demonstrate use of math and string in-built functions.
9. Design  and  Test  Python  Program  to  demonstrate  use  of  built  in  modules  and  user  defined modules.
10. Design  and  Test  Python  Program  to  demonstrate  use  of  built  in  packages  and  user  defined packages.
11. Design and Test Python Program to demonstrate use of string processing functions.
12. Design and Test Python Program to demonstrate use of basic file functions.

<!-- image -->

## GUJARAT TECHNOLOGICAL UNIVERSITY

Program Name: Diploma Engineering Level: Diploma

## Branch: Computer Engineering / Computer Science and Engineering

/ Cyber System and Information Security Subject Code : DI02000101

Subject Name : Scripting Language

## List of Laboratory/Learning Resources Required:

1. Computer with basic configuration with windows or unix os
2. Text Editor (VS Code, Sublime Text, Atom, Vim or any other editor) or Python IDE (IDLE, PyCharm, PyDev, Spyder or any other IDE)
3. Python Interpreter (Versions: 3.6.x or higher)
4. Jupyter Notebook (Optional)

## Suggested Project List:

1. Create a basic calculator application to practice functions and control structures.
2. Develop a number-guessing game using loops and conditional statements.
3. Create  a  system  for  managing  books,  including  features  for  adding,  updating,  and  deleting records.
4. Create a program to plot sine and cosine waves using Matplotlib.
5. Use dictionaries and inheritance to manage employee details and calculate salaries.
6. Design an application to manage daily expenses, storing data in a file.
7. Create a program that uses modules to fetch and display weather data for a given location.

## Suggested Activities for Students:

- a) https://www.codechef.com/ , in this website very elementary programs are available, students are expected to solve those programs
- b) https://code.org/,  an  hour  of  coding  event  may  be  organized  and  students  are  encouraged  to participate.
- c) Students  are  encouraged  to  register  themselves  in  various  MOOCs  such  as:  Swayam,  edx, Coursera, Udemy etc to further enhance their learning.
- d) Encourage  students  to  participate  in  different  coding  competitions  like  Hackathon,  online competitions on codechef etc.
- e) Encourage students to form a coding club at institute level.