PYTHON PROGRAMMING (PYP)
IV Semester : Common for CSE & CST Scheme : 2020
Course
Category Hours/Week Credits Maximum Marks
Code
Continuous
End
L T P C Internal TOTAL
SCCS01 SC Exam
Assessment
1 - 2 2 40 60 100
Sessional Exam Duration : 1½ Hrs End Exam Duration: 3 Hrs
Course Outcomes : At the end of the course the student will be able to
CO1: Understand the python programming constructs, operators and expressions.
CO2: Apply the concepts of functions, decision and control structures to solve problems.
CO3: Apply the core data structures String, List, Tuple, Set and Dictionaries to solve problems.
CO4: Understand file operations, exception handling and modules.
CO5: Apply Object Oriented Programming concepts to solve real life problems.
UNIT – I
Introduction to Python Programming: Overview of Programming Languages, History of Python,
Installing Python, Executing Python Programs, Commenting in Python, Internal Working of Python.
Basics of Python Programming: Python Character Set, Token, Python Core Data Type, I/O functions,
Assigning Value to a Variable, Multiple Assignments, Writing Simple Programs in Python, Formatting
Number and Strings, Python Inbuilt Functions.
Operators and Expressions: Operators and Expressions, Arithmetic Operators, Operator Precedence
and Associativity, Changing Precedence and Associativity of Arithmetic Operators, Translating
Mathematical Formulae into Equivalent Python Expressions, Bitwise Operator, The Compound
Assignment Operator.
UNIT – II
Decision Statements: Boolean Type, Boolean Operators, Using Numbers with Boolean Operators,
Using String with Boolean Operators, Boolean Expressions and Relational Operators, Decision Making
Statements, Conditional Expressions.
Loop Control Statements: The while Loop, The range() Function, The for Loop, Nested Loops, The
break Statement, The continue Statement.
Functions: Syntax and Basics of a Function, Use of a Function, Parameters and Arguments in a
Function, The Local and Global Scope of a Variable, The return Statement, Recursive Functions, The
Lambda Function.
UNIT – III
Strings: The str class, Basic Inbuilt Python Functions for String, The index[] Operator, Traversing String
with for and while Loop, Immutable Strings, The String Operators, String Operations.
Lists: Creating Lists, Accessing the Elements of a List, Negative List Indices, List Slicing [Start: end],
List Slicing with Step Size, Python Inbuilt Functions for Lists, The List Operator, List Comprehensions,
List Methods, List and Strings, Splitting a String in List, Passing List to a Function, Returning List from
a Function.
Tuples, Sets and Dictionaries: Introduction to Tuples, Sets, Dictionaries.
UNIT – IV
Exceptions: When Something Goes Wrong, Classes of Exceptions, A Final Note on Pythonic Exception
Handling.
File Handling: Need of File Handling, Text Input and Output, The seek() Function, Binary Files,
Accessing and Manipulating Files and Directories on a Disk.
Modules: Reusing Code with Modules and Packages, Understanding Python Modules, Everyday
Module Usage, Advanced Module Behavior, Combining Modules into Packages
UNIT – V
Object-Oriented Programming: Class, Objects and Inheritance: Defining Classes, The Self-
parameter and Adding Methods to a Class, Display Class Attributes and Methods, Special Class
Attributes, Accessibility, The __init__ Method (Constructor), Passing an Object as Parameter to a
Method, __del__() (Destructor Method), Class Membership Tests, Method Overloading, Operator
Overloading, Inheritance, The Object Class.
Text Books:
1. Programming and problem solving with Python by Ashok Namdev Kamthane, Amit Ashok
Kamthane (2018): McGraw Hill Education (India) Private Limited.
2. Python 3 for Absolute Beginners, Tim Hall and J-P Stacey, Apress.
Reference Books:
1. Python -The Ultimate Beginner’s Guide! , Andrew Johansen.
Web References:
1. https://www.tutorialspoint.com/python3/
2. https://docs.python.org/
3. https://realpython.com/
Question Paper Pattern:
Sessional Examination:
The question paper for sessional examination shall be for 25 marks, covering half of the syllabus for first
sessional and remaining half for second sessional exam. The question paper shall consist of three
sections with Two Questions (EITHER/ OR Type) in each section. The student shall answer one question
from each section.
End Examination:
The question paper for End examination shall be for 60 marks. The Question paper shall contain Five
Units with Two Questions (Either or Type) from each unit. Each of these questions may contain sub
question and the student should answer any one question from each unit. Each Question carries 12
marks.
Laboratory:
1. Implement operations on numbers.
2. Implement decision making and looping statements.
3. Demonstrate the concept of functions.
4. Demonstrate the working of core data structures.
5. Demonstrate the creation and importing of modules.
6. Implement exception handling concepts.
7. Implement file operations.
8. Demonstrate Object-Oriented Programming concepts.