0% found this document useful (0 votes)
34 views3 pages

VR23 - Syllabus II - II - Python

The document outlines the syllabus for a Python Programming course, detailing course objectives, outcomes, and a structured curriculum divided into five units. Each unit covers essential programming concepts, data structures, file handling, object-oriented programming, and an introduction to data science using Python. Sample experiments are provided for practical application of the concepts learned throughout the course.

Uploaded by

jb4634685
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views3 pages

VR23 - Syllabus II - II - Python

The document outlines the syllabus for a Python Programming course, detailing course objectives, outcomes, and a structured curriculum divided into five units. Each unit covers essential programming concepts, data structures, file handling, object-oriented programming, and an introduction to data science using Python. Sample experiments are provided for practical application of the concepts learned throughout the course.

Uploaded by

jb4634685
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Program Structure and Detailed Syllabus (VR-23)

Course Code L T P Credits


PYTHON PROGRAMMING (Skill Course)
1012232180 0 1 2 2

Pre-requisite: Fundamentals of Programming Language


Course Objectives: The main objectives of the course are to
1. Introduce core programming concepts of Python programming language.
2. Apply built-In functions, strings and lists.
3. Demonstrate about Python data structures like Lists, Tuples, Sets and dictionaries.
4. Implement Modules and Regular Expressions in Python Programming and to create
practical and contemporary applications.
5. Apply basic functional data science programming with python
Course Outcomes:

COs At the end of the course, the student will have the ability to:
Apply core concepts of Python programming, including conditional statements, loops,
CO1
and operators, to develop basic programs efficiently.
Implement and manipulate Python data structures such as lists, dictionaries, tuples, and
CO2
sets to solve computational problems effectively.
Design Python programs using functions, modules, and file handling techniques to
CO3
process and manage data efficiently.
Analyze data using Python libraries like NumPy and Pandas, and visualize relationships
CO4
between attributes through data plotting and manipulation.
UNIT-I: (9 Hours)
History of Python Programming Language, Thrust Areas of Python, Installing Anaconda
Python Distribution, Installing and Using Jupyter Notebook.
Parts of Python Programming Language: Identifiers, Keywords, Statements and
Expressions, Variables, Operators, Precedence and Associativity, Data Types, Indentation,
Comments, Reading Input, Print Output, Type Conversions, the type () Function and Is
Operator, Dynamic and Strongly Typed Language.
Control Flow Statements: if statement, if-else statement, if-elif-else, Nested if statement,
while Loop, for Loop, continue and break Statements, Catching Exceptions Using try and
except Statement.
Sample Experiments:
1. Write a program to find the largest element among three Numbers.
2. Write a Program to display all prime numbers within an interval.
3. Write a program to swap two numbers without using a temporary variable.
4. Demonstrate the following Operators in Python with suitable examples.
i) Arithmetic Operators ii) Relational Operators iii) Assignment Operators
iv) Logical Operators v) Bit wise Operators vi) Ternary Operator
vii) Membership Operators viii) Identity Operators
5. Write a program to add and multiply complex numbers.
6. Write a program to print multiplication table of a given number.

Department of Electrical and Electronics Engineering Page 71


Program Structure and Detailed Syllabus (VR-23)

UNIT-II: (9 Hours)
Functions: Built-In Functions, Commonly Used Modules, Function Definition and Calling
the function, return Statement and void Function, Scope and Lifetime of Variables, Default
Parameters, Keyword Arguments, *args and **kwargs, Command Line Arguments.
Strings: Creating and Storing Strings, Basic String Operations, Accessing Characters in
String by Index Number, String Slicing and Joining, String Methods, Formatting Strings.
Lists: Creating Lists, Basic List Operations, Indexing and Slicing in Lists, Built-In Functions
Used on Lists, List Methods, del Statement.
Sample Experiments:
1. Write a program to define a function with multiple return values.
2. Write a program to define a function using default arguments.
3. Write a program to find the length of the string without using any library functions.
4. Write a program to check if the substring is present in a given string or not.
5. Write a program to perform the given operations on a list:
i) addition ii) insertion iii) slicing
6. Write a program to perform any 5 built-in functions by taking any list.

UNIT-III: (9 Hours)
Dictionaries: Creating Dictionary, Accessing and Modifying key: value Pairs in Dictionaries,
Built-In Functions Used on Dictionaries, Dictionary Methods, del Statement.
Tuples and Sets: Creating Tuples, Basic Tuple Operations, tuple () Function, Indexing and
Slicing in Tuples, Built-In Functions Used on Tuples, Relation between Tuples and Lists,
Relation between Tuples and Dictionaries, using zip () Function, Sets, Set Methods,
Frozenset ()
Sample Experiments:
1. Write a program to create tuples (name, age, address, college) for at least two members
and concatenate the tuples and print the concatenated tuples.
2. Write a program to count the number of vowels in a string (No control flow allowed).
3. Write a program to check if a given key exists in a dictionary or not.
4. Write a program to add a new key-value pair to an existing dictionary.
5. Write a program to sum all the items in a given dictionary.

UNIT-IV: (9 Hours)
Files: Types of Files, Creating and Reading Text Data, File Methods to Read and Write Data,
Reading and Writing Binary Files, Pickle Module, Reading and Writing CSV Files, Python
os and [Link] Modules.
Object-Oriented Programming: Classes and Objects, Creating Classes in Python, Creating
Objects in Python, Constructor Method, Classes with Multiple Objects, Class Attributes Vs
Data Attributes, Encapsulation, Inheritance, Polymorphism.

Department of Electrical and Electronics Engineering Page 72


Program Structure and Detailed Syllabus (VR-23)

Sample Experiments:
1. Write a program to sort words in a file and put them in another file. The output file
should have only lower-case words, so any upper-case words from source must be
lowered.
2. Python program to print each line of a file in reverse order.
3. Python program to compute the number of characters, words and lines in a file.
4. Write a program to create, display, append, insert and reverse the order of the items in
the array.
5. Write a program to add, transpose and multiply two matrices.
6. Write a Python program to create a class that represents a shape. Include methods to
calculate its area and perimeter. Implement subclasses for different shapes like circle,
triangle, and square.

UNIT-V: (9 Hours)
Introduction to Data Science: Functional Programming, JSON and XML in Python, NumPy
with Python, Pandas.
Sample Experiments:
1. Python program to check whether a JSON string contains complex object or not.
2. Python Program to demonstrate NumPy arrays creation using array () function.
3. Python program to demonstrate use of ndim, shape, size, dtype.
4. Python program to demonstrate basic slicing, integer and Boolean indexing.
5. Python program to find min, max, sum, cumulative sum of array.
6. Create a dictionary with at least five keys and each key represent value as a list where
this list contains at least ten values and convert this dictionary as a pandas data frame
and explore the data through the data frame as follows:
a) Apply head () function to the pandas data frame.
b) Perform various data selection operations on Data Frame.
7. Select any two columns from the above data frame, and observe the change in one
attribute with respect to other attribute with scatter and plot operations in matplotlib

Reference Books:
1. Gowri Shankar S, Veena A., Introduction to Python Programming, CRC Press.
2. S Sridhar, J Indumathi, V M Hariharan, Python Programming, 2nd Edition, Pearson,
2024.
3. Y. Daniel Liang, Introduction to Programming Using Python, Pearson.
Online Learning Resources/Virtual Labs:
1. [Link]
2. [Link]

Department of Electrical and Electronics Engineering Page 73

Common questions

Powered by AI

The course enhances problem-solving skills by requiring students to apply Python programming concepts, such as functions, loops, data structures, and operators, to solve complex computational problems. Exercises like writing programs to find primes, swapping numbers, or modifying lists challenge students to think critically and apply Python effectively .

The course integrates data structures by teaching students how to implement and manipulate Python data structures such as lists, dictionaries, tuples, and sets. It emphasizes solving computational problems effectively using these structures and exploring their methods and operations through practical programming experiments .

Object-oriented programming (OOP) is featured through the creation and manipulation of Python classes and objects. Students learn about class attributes, data attributes, encapsulation, inheritance, and polymorphism, with sample experiments like creating classes for various shapes and implementing their methods for area and perimeter calculations .

The course content highlights the significance of various Python operators by requiring students to demonstrate and utilize arithmetic, relational, assignment, logical, bit-wise, ternary, membership, and identity operators. Understanding these operators is essential for writing effective code and performing intricate calculations and comparisons .

JSON and XML handling are incorporated to equip students with the skills to manage data formats commonly used in web services and data exchange. The course involves practical experiments checking JSON strings for complex objects, demonstrating their creation, and highlighting the importance of processing structured data efficiently in Python applications .

Understanding Python's dynamic and strongly-typed nature is emphasized because it influences how variables are assigned and manipulated. Python's type system allows flexibility but requires understanding to avoid type-related errors. This aspect is critical for debugging and writing robust Python programs .

The course introduces core programming concepts of Python programming, including the use of conditional statements, loops, operators, Python data structures like lists, tuples, sets, and dictionaries, modules, and regular expressions. It also covers the application of Python in data science using libraries such as NumPy and Pandas .

Python libraries like NumPy and Pandas play a crucial role in the course by enabling students to analyze and visualize data. These libraries help in performing tasks such as array creation, indexing, and data frame manipulation. Students engage in experiments that involve creating data frames, performing data selection operations, and visualizing data relationships using matplotlib .

Understanding control flow statements is important as they allow students to manage the logic of their programs through conditional structures like if statements, loops such as while and for loops, and exception handling with try and except. This knowledge is foundational for developing efficient and complex programs .

The course covers various aspects of data handling and file operations, including creating and reading text and binary files, using file methods for reading and writing data, working with CSV files, and employing the os and os.path modules. Experiments involve sorting, reversing, and counting elements within files, reflecting a comprehensive approach to file handling .

You might also like