SILVER OAK UNIVERSITY
College of Technology
Bachelor of Technology
Information Technology
Course Name: Programming in Python
Course Code: 1010043230
Semester: 4th
Prerequisite:
Programming Concepts
Course Objectives:
1. Python is a modern language primarily useful for writing compact codes for programming in
Web development on the server side, data analytics, AI and scientific computing, as well as
production tools and game programming.
2. To build packages with python modules for reusability and handle user’s exceptions.
3. To create a real-world GUI application, establish database connectivity.
4. It covers both the fundamentals and advanced programming of Python to harness its ability for
modern requirements for computing
Teaching Scheme:
Teaching Scheme
L T P Contact Hours Credit
3 0 2 5 4
Contents:
Uni Teaching
Topics Weightage %
t Hours
Introduction to Python Programming:
History of Python, Python Features, Local Environment Setup,
Installing Python, setting up path, Python Syntax, Keywords,
Variables, Data Types: Scalar Types, Sequence Type, Mapping
1 6 25
Type, Set Types, Mutable Types: List, Dictionary, Set, Immutable
Types: Numbers, String, Tuple, Operators: Arithmetic, Assignment,
Comparison, Logical, Identity, Membership, Bitwise,
Basic of String-String operations
Conditional & Control Structures:
2 Conditional: if, if.. else, if-elif and nested if, Loops: for, while, 4 15
nested loops, Break and Continue Statement.
Functions & Recursion: Function calls, Type Conversion and
Coercion, Math Functions, Adding new Function, Parameters and
3 Argument, Recursion and its use, Lambda Functions and 5 10
Anonymous Functions in Python, Python decorator (with -@
Symbol - Chaining - Parameters)
Objects& Classes:
Overview of OOP Terminology, Creating Classes, Creating
4 Instance Objects, Destroying Objects, Access Modifiers, 5 10
Inheritance, Polymorphism, Operator Overloading, Abstract
Classes, Overriding Methods
5 Exceptions Handling – Python integrate with SQL: 8 15
File Operations –Iterators - Exception handling - Regular
Expressions PIP: Introduction – Installing Packages via PIP-Using
Python Packages. My SQL Connectivity, Installing MySQL -
Connector, Establishing Connection, Creating Cursor Object,
Create database
GUI Programming:
GUI programming in Python – Introduction to GUI library-Layout
6 management - Events and Bindings - Fonts - Colors - Canvas – 8 15
Widgets (frame, label, button, checkbox, entry, list box, message,
radio button, text, spin box).
Advance Libraries:
7 Use of Libraries: Numpy, pandas, matplotlib, Pillow, Keras, 6 10
TensorFlow, Introduction to different framework in python
Course Outcomes:
Sr.
CO Statement Unit
No.
Apply the basic concepts and understand the various data structures available
CO-1 1
in Python programming language
CO-2 Use Python Programming to solve computational problems. 2
CO-3 Apply the functions in Python Programming to solve the problems. 3
CO-4 Implement object-oriented concepts using Python. 4
Design GUI applications and evaluate different database operations and to
CO-5 5
use user inbuilt libraries for the real time application
Teaching & Learning Methodology:
The various methods or tools follows by the faculties to teach the above subject are:
1. Problem - based Learning
2. Design Thinking
3. Cooperative-based Learning
4. Competency-based Learning
List of Experiments: Total Hours: 28
Sr. No. Practical Name
Create a program that asks the user to enter their name and their age. Print out a message
1
addressed to them that tells them the year that they will turn 100 years old.
2 Develop a python program to make a simple calculator using a conditional loop.
Ask the user for a number. Depending on whether the number is even or odd, print out an
appropriate message to the user. Hint: how does an even / odd number react differently
3
when divided by 2?
Self: If the number is a multiple of 4, printout a different message
Take a list, say for example this one:
a= [1,1, 2, 3, 5,8, 13, 21, 34, 55, 89], and write a program that prints out all the elements
of the list that are less than 5.
4
Self:
Instead of printing the elements one by one, make a new list that has all the elements less
than 5 from this list in it and print out this new list
Make a two-player Rock-Paper-Scissors game. (Hint: Ask for player plays (using input),
5 compare them, print out a message of congratulations to the winner, and ask if the
players want to start a new game)
Remember the rules:
Rock beats scissors, Scissors beats paper, Paper beats rock
Ask the user for a string and print out whether this string is a palindrome or not. (Using
6
string reversal and for loops).
Writeaprogram(function!) that takes a list and returns a new list that contains all the
elements of the first list minus all the duplicates.
7
Self: Write two different functions to do this-one using a loop and constructing a list,
and another using set.
Write a program (using functions!) that asks the user for a long string function.
Containing
8 [Link],exceptwiththewordsinbackwards order.
For example, say I type the string: My name is Michele
Then I would see the string: Michele is name My (shown back to me)
9 Write a Python class named Circle constructed by a radius and two methods which will
compute the area and the perimeter of a circle.
10 Write a python program to create a multiple inheritance using two super classes as
Ferrari, Benz and the subclass as Car
Develop the given programs to learn regular expressions using python
1. Write a Python program to check that a string contains only a certain set of
characters (in this case a-z, A-Z and 0-9)
11 2. Write a Python program that matches a string that has an a followed by zero or
one 'b'
3. Write a Python program to find sequences of lowercase letters joined by an
underscore.
4. Write a Python program that matches a word containing 'z'.
12 Establish a connection between MySQL database and python and create a database as
‘college’. Check whether the database has been created or not using the python interface.
13 Create a table ‘student’ inside the database ‘college’ using python script mode as the
interface and perform the CRUD operation.
14 Design a GUI form with a vertical box layout that includes labels and entry fields for
user registration information
15 Create a GUI window with a grid layout that contains buttons representing a 3x3 game
board
Create a canvas in your GUI program and draw simple shapes such as rectangles,
16
circles, and lines
17 Perform indexing and slicing operations on Numpy array.
18 Load a data set using pandas and perform basic data manipulation and data cleaning
operations.
19 Create a simple line chart using Matplotlib to visualize a dataset.
Major Equipment:
1. Modern desktop PC with Anaconda, IDLE, MySQL.
Books Recommended:
1. R. Nageswara Rao, “Core Python Programming ‖”, Dreamtech Press.
2. Y. Daniel Liang, “Introduction to Programming Using Python”, Pearson
3. Reema Thareja, “Python Programming: Using Problem Solving Approach”, Oxford University
Press
4. Martin C Brown, “Python the Complete Reference”, Tata Mcgraw Hill, India
5. Ashok Kamthane and Amit Ashok Kamthane, “Programming and Problem Solving with
Python”, Tata Mcgraw Hill, India
6. John V Guttag. “Introduction to Computation and Programming Using Python”, Prentice Hall of
India
List of Open-Source Software/learning website:
1. [Link]
2. [Link]
3. [Link]
4. [Link]
CO-PO-PSO Matrix:
CO No. PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2
CO-1 3 1 1 1 1 1 1
CO-2 3 3 3 2 3 3 1
CO-3 3 3 2 2 3 1 1
CO-4 3 1 1 1 3 1 1
CO-5 3 2 3 1 3 3 1