0% found this document useful (0 votes)
109 views4 pages

Python Programming

The document summarizes a 4th semester subject on Python Programming at Silver Oak University. The subject aims to teach students the fundamentals and advanced concepts of Python for uses like web development, data analytics, AI, and scientific computing. It includes 7 units covering topics like Python syntax, data types, operators, conditionals, loops, functions, recursion, strings, object-oriented programming, and key Python libraries. Students will be evaluated through a theory exam, practical exam, and coursework. The course outcomes are to explain Python principles, apply data structures to problems, use regular expressions, implement OOP concepts, and utilize built-in libraries for applications.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
109 views4 pages

Python Programming

The document summarizes a 4th semester subject on Python Programming at Silver Oak University. The subject aims to teach students the fundamentals and advanced concepts of Python for uses like web development, data analytics, AI, and scientific computing. It includes 7 units covering topics like Python syntax, data types, operators, conditionals, loops, functions, recursion, strings, object-oriented programming, and key Python libraries. Students will be evaluated through a theory exam, practical exam, and coursework. The course outcomes are to explain Python principles, apply data structures to problems, use regular expressions, implement OOP concepts, and utilize built-in libraries for applications.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 4

SILVER OAK UNIVERSITY

College of Technology (01)


Bachelor of Technology in (CE/IT) Engineering
Subject Name: Python Programming
Subject Code: 1010043221
Semester: 4 th

Prerequisite:
1. Programming Concepts

Objective:
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
production tools and game programming. This course discusses the fundamentals and advanced
programming of Python to harness its ability for modern requirements for computing.

Teaching and Examination Scheme:

Teaching Scheme Evaluation Scheme


Theory Practical Total
Contact
L T P Credit CIE ESE CIE ESE Marks
Hours
(TH) (TH) (PR) (PR)
3 0 2 5 4 40 60 20 30 150

Contents:

Teaching Module
Unit Topics
Hrs. Weightage
No.
1 Introduction to Python Programming: 02 5%

History of Python, Python Features, Local Environment Setup,


Installing Python, Setting up PATH
2 Basic of Python Programming: 08 20%

Python Syntax, Keywords, Variables, Data Types: Scalar Types,


Sequence Type, Mapping Type, Set Types, Mutable Types: List,
Dictionary, Set, Immutable Types: Numbers, String, tuple,
Operators: Arithmetic, Assignment, Comparison, Logical,
Identity, Membership, Bitwise
3 Condition & Control structures in Python Programming: 06 15%

Condition: If, If. Else and nested if, Loops: For, while loops,
Nested loops, Enumerate, Break, Continue Statement.

4 Functions & recursion in Python Programming: 06 15%

Function calls, type conversion and coercion, math functions,


adding new function, parameters and argument, recursion and its
use, Lambda Functions and Anonymous Functions in Python
5 String in Python Programming: 04 10%
Basic of String, Slicing Strings, Modify Strings, String
Concatenation, Format – Strings, Escape Characters Inbuilt
method of Strings, Basic of Regular Expressions

6 Objects and Classes in Python Programming: 06 15%

Overview of OOP Terminology, Creating Classes, Creating


Instance Objects, Destroying Objects, Access Modifiers,
Inheritance, Polymorphism, operator overloading, Abstract
classes, Overriding Methods
7 Advanced Topics in Python Programming: 08 20%

Use of Libraries: Numpy, Pandas, matplotlib, Pillow, Keras,


TensorFlow, Introduction to different framework in python

Course Outcomes:

Sr. No . CO Statement Unit

CO-1 Explain basic principles of Python programming language 1

CO-2 To be able to understand the various data structures available in Python 2,3
programming language and apply them in solving computational problems.
CO-3 To be able to do text filtering with regular expressions in Python 4,5

CO-4 Implement object oriented concepts 6

CO-5 To be able to user inbuilt library for the real time application. 5,6,7

Teaching & Learning Methodology: -

Problem - based Learning


Design Thinking
Cooperative Learning
Competency-based Learning

List of Experiments

Sr. No. Practical Name

1 Create a program that asks the user to enter their name and their age. Print out a message 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.

3 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 when
divided by 2?
Self:
If the number is a multiple of 4, print out a different message

4 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.
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
5 Create a program that asks the user for a number and then prints out a list of all the divisors of that
number. (If you don’t know what a divisor is, it is a number that divides evenly into another number.
For example, 13 is a divisor of 26 because 26 / 13 has no remainder.)

6 Take two lists a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] b = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13] and
write a program that returns a list that contains only the elements that are common between the lists
(without duplicates). Make sure your program works on two lists of different sizes. Write this using
at least one list comprehension. Self: Randomly generate two lists to test this.

7 Ask the user for a string and print out whether this string is a palindrome or not. (Using string
reversal and for loops).

8 Let’s say I give you a list saved in a variable: a = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100]. Write
one line of Python that takes this list and makes a new list that has only the even elements of
this list in it.
Self:
Create list contains square of all odd numbers from range 1 to 10
Create list contains power of 2 from 1 to 8
Create list contains prime and non-prime in range 1 to 50

9 Make a two-player Rock-Paper-Scissors game. (Hint: Ask for player plays (using input),
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

10 Generate a random number between 1 and 9 (including 1 and 9). Ask the user to guess the
number, then tell them whether they guessed too low, too high, or exactly right.
Self:
Keep the game going until the user types “exit”

11 Write a program that takes a list of numbers (for example, a = [5, 10, 15, 20, 25]) and makes a
new list of only the first and last elements of the given list. For practice, write this code inside
a function.

12 Write a Python program to print all unique values in a dictionary.


Sample Data : [{"V":"S001"}, {"V": "S002"}, {"VI": "S001"}, {"VI": "S005"},
{"VII":"S005"}, {"V":"S009"},{"VIII":"S007"}]
Expected Output : Unique Values: {'S005', 'S002', 'S007', 'S001', 'S009'}
Self:
Write a Python program to create and display all combinations of letters, selecting each letter
from a different key in a dictionary. Go to the editor
Sample data : {'1':['a','b'], '2':['c','d']}
Expected Output: ac, ad, bc, bd

13 Write a program that asks the user how many Fibonacci numbers to generate and then
generates them. Take this opportunity to think about how you can use functions. Make sure to
ask the user to enter the number of numbers in the sequence to generate. (Hint: The Fibonacci
sequence is a sequence of numbers where the next number in the sequence is the sum of the
previous two numbers in the sequence. The sequence looks like this: 1, 1, 2, 3, 5, 8, 13, …)

14 Write a program (function!) that takes a list and returns a new list that contains all the
elements of the first list minus all the duplicates.
Self:
Write two different functions to do this - one using a loop and constructing a list, and another
using sets.

15 Write a program (using functions!) that asks the user for a long string function. Containing
multiple words. Print back to the user the same string, except with the words in backwards
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
16 Write a Python class named Circle constructed by a radius and two methods which will
compute the area and the perimeter of a circle.

17 Implement Multiple Inheritance. Python supports classes inheriting from other classes. The
class being inherited is called the Parent or Superclass, while the class that inherits is called
the Child or Subclass. How can we define the order in which the base classes are searched?
when executing a method? (Hint: MRO: Method Resolution Order)

18 Develop programs to learn regular expressions using python

Major Equipment:

1. Modern desktop PC with Anaconda and IDLE.

Books Recommended: -

1. Introduction to Programming Using Python by Y. Daniel Liang, Pearson


2. Python Programming: Using Problem Solving Approach by Reema Thareja, Oxford University Press
3. Python the Complete Reference by Martin C Brown, Tata Mcgraw Hill, India
4. Programming and Problem Solving with Python by Ashok Kamthane and Amit Ashok Kamthane,
Tata Mcgraw Hill, India
5. John V Guttag. “Introduction to Computation and Programming Using Python”, Prentice Hall of
India

List of Open-Source Software/learning website:

1. www.nptel.ac.in
2. https://docs.python.org/3/tutorial/
3. www.cpu-world.com

You might also like