Department of Information Science and Engineering
Acharya Institute of Technology
Acharya Dr.Sarvepalli Radhakrishnan Road Bangalore-560107
PYTHON APPLICATION PROGRAMMING
[As per Choice Based Credit System (CBCS) scheme - Effective from the academic year 2018-19]
Semester : VII I.A. Marks : 40
Course Code : 18CS752 Exam Marks : 60
Total Hours / Week (L : T : P) : 40 Exam Hours : 03
Course Learning Objectives: This course (18CS752) will enable students to:
Learn Syntax and Semantics and create Functions in Python.
Handle Strings and Files in Python.
Understand Lists, Dictionaries and Regular expressions in Python.
Implement Object Oriented Programming concepts in Python
Build Web Services and introduction to Network and Database Programming in Python.
Module 1
Why should you learn to write programs, Variables, expressions and statements, Conditional execution,
Functions
Why should you learn to write programs
Creativity and Motivations Computer H/w Architecture, Understanding Programming Words and
Sentences, Conversing with Python
Terminology: interpreter and compiler, Writing a program, What is a program? The building blocks of
programs, what could possibly go wrong?, The learning journey
Variables-Values and types, variables, variable name and keywords, Statements, Operator and operands
Expressions and statements
Expressions, Order of operations, Modulus Operator, String Operations, Asking the user for input,
Comments, Choosing mnemonic variable names, Debugging
Conditional execution-Boolean Expressions, Logical operators Conditional executions, Alternative
execution, Chained conditional, Nested Conditionals, Catching exceptions using try and except, Short-
circuit evaluation of logical expressions
Functions- Function calls, Built-in functions, Type Conversion functions, Random numbers, Math
functions, Adding new functions, Definition and uses, Flow of execution, Parameters and arguments,
Fruitful functions and void functions, Why functions? Debugging
Textbook 1: Chapters 1 – 4
RBT: L1, L2
Module 2
Iteration, Strings, Files
Iteration-Updating variables, The while statement, Infinite Loops, "Infinite Loops" and break, Finishing
iterations with continue, Definite loops using for
Loop patterns---Counting and summing loops, Maximum and minimum loops, Debugging
Strings-A string is a sequence, Getting the length of a string using len, Traversal through a string with a
loop, String slices, Strings are immutable, Looping and counting, The in operator, String comparison,
String methods, Parsing strings, Format operator, Debugging
Files-Persistence, Opening files, Text files and lines, Reading files, Searching through a file, Letting the
user choose the filename, Using try, except and open, Writing files, Debugging
Textbook 1: Chapters 5– 7
RBT: L1, L2, L3
Module 3
Lists, Dictionaries, Tuples, Regular Expressions
Lists-A list is a sequence, Lists are mutable, Traversing a list, List Operations, List slices, List methods,
Deleting elements, Lists and Functions, Lists and Strings, Parsing lines, Objects and values, Aliasing,
List arguments, Debugging
Dictionaries-As a set of counters, Dictionaries and files, Looping and Dictionaries, Advanced text
parsing, Debugging
Tuples- Tuples are immutable, Comparing tuples, Tuple assignment, Dicitionaries and tuples, multiple
assignment with dictionaries, The most common words, using tuples as keys in dictionaries
Regular Expressions-Character matching in regular expressions, Extracting data using regular
expressions, Combining, searching and extracting, Escape character, Summary, Bonus section for
Unix/Linux users, Debugging
Textbook 1: Chapters 8 – 11
RBT: L1, L2, L3
Module 4
Classes and objects, Classes and functions, Classes and methods
Classes and Objects - Programmer Defined Types, Attributes, Rectangles, Instances as Return Values,
Objects are Mutable, Copying, Debugging
Classes and Functions - Time, Pure, Functions, Modifiers, Prototyping and Planning, Debugging
Classes and Methods-Object-Oriented Features, Printing Objects, Another Example, A more
complicated Example, The init Method, The_str_method, Operator Overloading, Type-based Dispatch,
polymorphism, Interface and Implementation, Debugging.
Textbook 2: Chapters 15 – 17
RBT: L1, L2, L3
Module 5
Networked programs, Using Web Services, Using databases and SQL
Networked programs-HTTP, The world's simplest Web browser, Retriving an image over HTTP,
Retrieving web pages with urlib, Parsing HTML and scaping the web, Parsing HTML using regular
expressions, Parsing HTML using BeautifulSoup, Reading binary files using urllib.
Using Web Services-eXtensible Markup Language-XML, Parsing XML, Looping through nodessss,
JAvascript Object Notation- JSON, Parsing JSON, Application Programming Interfaces, Google
geocoding web service, Security and API usage
Using databases and SQL-What is a database? Database concepts, Database Browser for SQLite,
Creating a database table, Structured Query Language summary, Spidering Twitter using a database,
SQL Basic data modeling, Programming with multiple tables, Constraints in database tables, Retrieve
and/or insert a record, Storing the friend relationship, Three kinds of keys, Using JOIN to retrieve data,
Debugging.
Textbook 1: Chapters 12– 13, 15
RBT: L1, L2, L3
Course Outcomes: The student will be able to:
Examine Python syntax and semantics and be fluent in the use of Python flow control and
functions.
Demonstrate proficiency in handling Strings and File Systems.
Create, run and manipulate Python Programs using core data structures like Lists, Dictionaries
and use Regular Expressions.
Interpret the concepts of Object-Oriented Programming as used in Python.
Implement exemplary applications related to Network Programming, Web Services and
Databases
Question Paper Pattern:
The question paper will have ten questions.
Each full Question consisting of 20 marks
There will be 2 full questions (with a maximum of four sub questions) from each module.
Each full question will have sub questions covering all the topics under a module.
The students will have to answer 5 full questions, selecting one full question from each module.
Textbooks:
1. Charles R. Severance, “Python for Everybody: Exploring Data Using Python 3”, 1st Edition,
CreateSpace Independent Publishing Platform, 2016.
(http://do1.drchuck.com/pythonlearn/EN_us/pythonlearn.pdf )
2. Allen B. Downey, "Think Python: How to Think Like a Computer Scientist”, 2ndEdition, Green
Tea Press, 2015. (http://greenteapress.com/thinkpython2/thinkpython2.pdf) (Download pdf files
from the above links)
Reference Books:
1. Charles Dierbach, "Introduction to Computer Science Using Python",1st Edition, Wiley India
Pvt Ltd, 2015. ISBN-13: 978-8126556014
2. Gowrishankar S, Veena A, “Introduction to Python Programming”, 1st Edition, CRC
Press/Taylor & Francis, 2018. ISBN-13: 978-0815394372
3. Mark Lutz, “Programming Python”,4th Edition, O’Reilly Media, 2011.ISBN-13: 978-
350232873
4. Roberto Tamassia, Michael H Goldwasser, Michael T Goodrich, “Data Structures and
Algorithms in Python”,1stEdition, Wiley India Pvt Ltd, 2016. ISBN-13: 978-8126562176
5. Reema Thareja, “Python Programming Using Problem Solving Approach”, Oxford university
press, 2017. ISBN-13: 978-0199480173