2csoe78 CPD
2csoe78 CPD
Institute of Technology
Contact No. :
[email protected]
& Email
Office : N block faculty cabins
• Basically Python is a language that can be used for developing anything and
everything you want.
• Now a days, most of the organization wants to develop data science and
analytics to enhance decision making.
• Huge community support and large amount of API is available.
1.2 Course Objective:
• To understand why Python is a useful scripting language for developers. •
To learn how to design and program Python applications
1.3 Pre-requisite:
• Awareness of basics Programming knowledge.
3. Syllabus
Unit I: Introduction to Computational Science, Applications involving scientific
computing, Tools and languages to solve complex scientific problems Unit II:
Programming in Python- Interpreter and its environment; Introduction to data
types, concepts of mutability, operators and variables; random numbers, user
inputs, statements; branching, conditional and iteration; functions, file handling,
error handling and exceptions
Unit III: Object-oriented programming, classes and methods - encapsulation,
inheritance
Unit IV: Array computing and curve plotting, vectors and higher-dimensional
arrays, matrices, numPy, sciPy and Matplotlib
Unit V: Python Pandas - Data alignment, aggregation, summarization, computation
and analysis with Pandas
Unit VI: Scientific computation using python - Statistical data analysis, image
processing, web development and hardware interfacing using Python
3.1 Self-study:
Tools and languages to solve complex scientific problems and hardware interfacing
using Python.
4 Laboratory details
Laboratory work will be based on above syllabus with following experiments
to be performed.
Each experiment will be of 10 marks. Evaluation for 100 marks will be done
throughout the semester as part of the Continuous Evaluation scheme. The
assessment of Laboratory work is as under:
Total Continuous Evaluation Semester End
Marks /Viva voce
Evaluation
• Code logic
• Timely submission
• Error Solving
References:
1. Hans Petter Langtangen, A Primer on Scientific Programming with Python
(Link)
2. Claus Fuhrer, Jan Erik Solem, Olivier Verdier, Scientific Computing with
Python 3,Packt Publishing Limited
3. Martin C. Brown, Python: The Complete Reference, McGraw Hill Education 4.
Hemant Kumar Mehta, Mastering Python Scientific Computing, Packt
Publishing Limited
5. Sergio J. Rojas G., Erik A. Christensen, Francisco J. Blanco-Silva, Learning
SciPy for Numerical and Scientific Computing, Packt Publishing Limited
List of Practicals
1. Write a function that takes a string as a parameter and returns a string with
every successive repetitive character replaced with a star(*). For Example,
‘balloon’ is returned as ‘bal*o*n’.
(hint: https://www.w3schools.com/python/python_strings.asp)
2. Write a function that takes a number as n input parameter and returns the
2 4 corresponding text in words; for example, on input 452, the function should 1,2
return ‘Four Five Two’. Use an indexed list for mapping to digits to their string
representation.
3. Write a recursive function that takes x value as an input parameter and print x-
digit strictly in increasing number. [i.e. x = 6 than output 67891011]
Write a python program that reads the contents of the file poem.txt and count the
number of alphabets blank spaces lowercase letters and uppercase letters the number
of words starting from vowel and the number of occurrences of each word in the file
(For file handling, refer: https://www.w3schools.com/python/python_file_open.asp
3 5 1,2
Important links
https://buomsoo-kim.github.io/colab/2018/04/15/Colab-Importing-CSV-and-
JSON-files-in-Google-Colab.md/)
1. Define a class Bank that keeps track of bank customers. The class should
contain the following data member:
2. Define a base class Person, having attributes name, birthdate and city. Define
the class Student that derives from Person class which is having attributes like
rollno, branch, totalMarks and year as data member. The class should contain
the instance method __init__ and the abstract method percentage. Define two
classes Grad and PostGrad which inherit from the base class Student. Both the
classes should define their __init__ method which asks user t enter totalMarks
value and should override the abstract method percentage of the superclass.
Note that totalMarks obtained are out of 600 and 400 for Grad and PostGrad
classes respectively.
1. A magic square is a matrix all of whose row sums, column sums and the sums
of the two diagonals are the same. (One diagonal of a matrix goes from the
top left to the bottom right, the other diagonal goes from top right to bottom
left.) Show by direct computation that if the matrix A is given by
The matrix A has 5 row sums (one for each row), 5 column sums (one for each column)
and two diagonal sums. These 12 sums should all be exactly the same, and you could
verify that they are the same by printing them and “seeing” that they are the same. It
is easy to miss small differences among so many numbers, though. Instead, verify that
A is a magic square by constructing the 5 column sums and computing the maximum
and minimum values of the column sums. Do the same for the 5 row sums, and
compute the two diagonal sums. Check that these six values are the same. If the
maximum and minimum values are the same, the flyswatter principle says that all
values are the same.
6 10 Fall of Wicket 1st 2nd 3rd 4th 5th 6th 7th 8th 9th 10th 2,3
India 5 35 24 0 99 1 35 15 27 14
England 10 55 34 21 2 7 118 29 32 10
Develop a python program that reads the data from a given CSV file, which is having
phone usage data using a different branded mobile phone. Determine if the usage
7 11 patterns for users differ between different devices. For example, do users using 2,3
Samsung devices use more call minutes than those using LG devices?
Develop a python program that reads the image, display matrix representation of an
9 14 image creates a histogram of the image and apply the smoothing effect on an image. 3
Develop a python program which takes the video as an argument and extract all the
10. 15 frames from a video. Select specific frames and recreate the video, which has selected 3
frames only.
Challenging practical list (Optional)
WT WT Type of No of WT WT WT
Assignm Tutor
en t ial s
7. Lesson Plan
Lectur Topic Mappe
e No. d
CLO
3 Concepts of mutability 2
4 Concepts of mutability 2
7 Functions 1
8 File handling 1
11 Encapsulation 1
12 Inheritance 1
14 Matrices 2
15 NumPy 3
16 NumPy 3
18 Matplotlib 3
26 Image processing 3
27 Image processing 3
28 Web development 3
29 Web development 3
NA
9. Teaching-learning methodology
• Lectures: Primarily Chalk and Black board will be used to conduct
the course for off-line lectures. However, where required (also for on-
line lectures), Power Point Presentations (PPTs), Video Lectures,
Simulations / Animations, Program()s Demonstration etc. will be
used to enhance the teaching-learning process.
• Laboratory: Explanation of Experiment to be performed along with
co-relation with theory will be given. At the end of each session
assessment will be carried out based on parameters like completion
of lab work that includes Logic Syntax, Error Solving, Timely
submission of practical’s and lab practical submission, Regularity
in attending lab sessions, Discipline of student in the lab sessions
/on-line sessions etc. Students will be quizzed to check their
understanding of the experiment/exercise conducted.
• Course Policy
• Lecture Notes (will be provided just before exam & not day to day) •
Books / Reference Books / NPTEL video lectures
• Assignments, Tutorials, Lab Manuals
• Question bank (As and when topics are covered in class and lab
sessions)
• Web-links, Video Lectures for reference
• Advanced topics