22PLU105B 205B IntroductionToPython-22PLC1052

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Dr.

Ambedkar Institute of Technology,


Bengaluru-56
Department of Computer Science & Business Systems 2023-
24
Course Title PYTHON PROGRAMMING
Course Code 22PLU205B
Category PLU
Scheme No. of Hours/Week Total teaching Credits
and L T P SS Total hours
Credits
03 00 0 00 02 42 03
CIE Marks: 50 SEE Marks: Total Max. Duration of SEE: 03 Hours
50 marks=100
COURSE OBJECTIVES
Describe the core syntax and semantics of Python programming language.

1. Discover the need for working with the strings and functions.
2. Illustrate the process of structuring the data using lists, dictionaries, tuples and sets.
3. Indicate the use of built-in functions to navigate the file system.
4. Infer the Object-oriented Programming concepts in Python.

UNIT-1 (08 hrs)

Introduction: What Is a Program? Programming Languages, Software Development, History


of Python Programming Language, Features of Python, Execution of a Python Program,
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
Control Flow Statements: The if, if…else, if…elif…else, Nested if Statement, while Loop,
the for Loop, the continue and break Statements
Textbook 1: Chapters 1,2,3
UNIT-2 (08 hrs)
Functions: Built-In Functions, Commonly Used Modules, Function Definition and Calling
the Function, The return Statement and void Function, Scope and Lifetime of Variables,
Default Parameters
Strings: Creating and Storing Strings, Basic String Operations, Accessing Characters in
String by Index Number, String Slicing and Joining, String Methods
Textbook 1: Chapters 4,5
UNIT-3 (08 hrs)
List: Creating Lists, Basic List Operations, Indexing and Slicing in Lists, Built-In Functions
Used on Lists, List Methods, Populating Lists with Items, Traversing of Lists, The del
Statement
Dictionaries: Creating Dictionary, Accessing and Modifying key: value Pairs in Dictionaries,
Built-In Functions Used on Dictionaries, Dictionary Methods, The del Statement,
Textbook 1: Chapter 6, 7
UNIT-4 (08 hrs)
Tuples and Sets: Creating Tuples, Basic Tuple Operations, Indexing and Slicing in Tuples,
Built-In Functions Used on Tuples, Tuple Methods, using zip () Function, Sets, Set Methods,
Traversing of Sets
Files: Types of Files, Creating and Reading Text Data, File Methods to Read and Write Data,
Textbook 1: Chapter 8,9
UNIT-5 (08 hrs)
Exception Handling: Catching Exceptions Using try and except Statement, Syntax Errors,
Exceptions, Exception Handling Using try…except…finally
Object-Oriented Programming: Features of OOPS, Classes and Objects, Creating Classes
in Python, Creating Objects in Python, The Constructor Method, Classes with Multiple
Objects, Class Attributes versus Data Attributes, Encapsulation, inheritance, polymorphism.
Textbook 2: Chapter 13,14
Programming Exercises:
1 a. Develop a program to read the student details like Name, USN, and Marks in three
subjects. Display the student details, total marks and percentage with suitable messages.
b. Develop a program to read the name and year of birth of a person. Display whether the
person is a senior citizen or not
2 a. Develop a program to generate Fibonacci sequence of length (N). Read N from the
console.
b. Develop a function to calculate factorial of a number.
3 Read N numbers from the console and create a list. Develop a program to print mean,
variance and standard deviation with suitable messages.
4 Develop python program to demonstrate the linear search applied on the array where if
the element is present or not with suitable message.
5 Develop a python program that has dictionary of names of students and list of list of
marks in three subjects. Create another dictionary from this dictionary that has names of
the students and their total marks. Display the topper based on his or her score.
6 a) Develop a program to count the numbers of characters in the given string and store
them in a dictionary data structure
b) Develop a program to use split and join methods in the given string and trace a birthday
with a dictionary data structure
7 Develop a python program to identify number of vowels, consonants, special characters
and digits in a given file.
8 Develop a program that inputs a text file. The program should print all of the unique
words in the file in alphabetical order.
9 Develop a function named DivExp which takes TWO parameters a, b and returns a value
c (c=a/b). Write suitable assertion for a>0 in function DivExp and raise an exception for
when b=0. Develop a suitable program which reads two values from the console and calls
a function DivExp.
10 Develop python program to simulate banking operation using class and objects

TEACHING LEARNING PROCESS: Chalk and Talk, power point presentation, animations,
videos

COURSE OUTCOMES: On completion of the course, student should be able to,


CO1: Interpret the fundamental Python syntax and semantics and be fluent in the use of Python
control flow statements.
CO2: Express proficiency in the handling of strings and functions.
CO3: Determine the methods to create and manipulate Python programs by utilizing the data
structures like lists, dictionaries, tuples and sets.
CO4: Identify the commonly used operations involving file systems and Exception handling
to develop efficient and error free codes.
CO5: Articulate the Object-Oriented Programming concepts such as encapsulation, inheritance
and polymorphism as used in Python.

TEXT BOOKS
1. Gowrishankar S, Veena A, “Introduction to Python Programming”, 1st
Edition, CRC Press/Taylor & Francis, 2018. ISBN-13: 978-0815394372
2. R Nageswara Rao “Core Python Programming”, 2nd Edition, Dream Tech Publishers.,
2017
REFERENCE BOOKS

1. Wesley J Chun, “Core Python Applications Programming”, 3rd Edition, Pearson


Education India, 2015. ISBN-13: 978-9332555365
2. Allen B. Downey, “Think Python: How to Think Like a Computer Scientist”,
2nd Edition, Green Tea Press, 2015. (Available under CC-BY-NC license at
http://greenteapress.com/thinkpython2/thinkpython2.pdf

ONLINE RESOURCES

1. https://www.learnbyexample.org/python-lambda-function/
2. https://www.youtube.com/watch?v=daefaLgNkw0
3. https://www.youtube.com/watch?v=W8KRzm-HUcc
4. https://www.learnpython.org/
5. https://pythontutor.com/visualize.html#mode=edit
6. https://github.com/sushantkhara/Data-Structures-And-Algorithms-with-
Python/raw/main/Python%203%20_%20400%20exercises%20and%20solutions%2
0for%20beginners.pdf

MAPPING of COs with POs

PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12
CO1 3 3 2 1 3 - - - - - - -
CO2 2 2 2 1 3 - - - - - - -
CO3 3 3 2 2 3 - - - - - - -
CO4 2 2 2 2 3 - - - - - - -
CO5 3 3 2 2 3 - - - - - - -
Strength of correlation: Low-1, Medium- 2, High-3

Faculty In-Charge

You might also like