BANASTHALI VIDYAPITH M.Sc. Python Course Handout 2024 PDF

Summary

This is a course handout for a Python programming course at BANASTHALI VIDYAPITH, offered in the 1st semester of the academic year 2024. The course covers fundamental Python concepts and data analysis libraries. It includes sections on the Core Python Language, NumPy, Polynomials, and Matplotlib.

Full Transcript

**BANASTHALI VIDYAPITH** **Department of Mathematics and Statistics** **COURSE HANDOUT** **M. Sc. I year** **Semester:** 1^st^ Semester **Session:** July- December 2024 **Course Code:** MATH 436 **Weekly load:** 04 Lectures/week **Course Title:** Scientific Computing with Python (Credit: 04)...

**BANASTHALI VIDYAPITH** **Department of Mathematics and Statistics** **COURSE HANDOUT** **M. Sc. I year** **Semester:** 1^st^ Semester **Session:** July- December 2024 **Course Code:** MATH 436 **Weekly load:** 04 Lectures/week **Course Title:** Scientific Computing with Python (Credit: 04) **Contact Hours:** 60 **Course In-charge:** Dr. Manish Raghav **Course Time Table:** +-----------------------+-----------------------+-----------------------+ | **Faculty Name** | **Venue** | **Day and Time** | | | | | | **(Section)** | | | +=======================+=======================+=======================+ | Dr. Manish Raghav | CMS - 101 | Wed-Sat, 10:05-11:00 | | | | AM | | (Section A) | | | | | | Sun-Mon 9:05-10:00 AM | +-----------------------+-----------------------+-----------------------+ **Course Objectives and Scope:** The course objective is to equip the students with the fundamentals of programming using Python. This course focuses on the building blocks of Python: variables, data types (numbers, strings, lists, dictionaries, and tuples), operators, and data analysis libraries like NumPy and SciPy and visualisation libraries like Matplotlib. **Course Description:** **Section A** **The Core Python Language I:** The Python Shell, Numbers, Variables, Comparisons and Logic, Python Objects I: Strings, Python Objects II: Lists, Tuples and Loops, Control Flow, File Input/Output, Functions, Simple Plots and Charts: Basic Plotting Labels, Legends and Customization, More Advanced Plotting. **The Core Python Language II:** Errors and Exceptions, Python Objects III: Dictionaries and Sets, Pythonic Idioms: "Syntactic Sugar", Operating- System Services, Modules and Packages, An Introduction to Object- Oriented Programming, Introduction to IPython and Jupyter Notebook. **Section B** **NumPy:** Basic Array Methods: Creating an Array, NumPy‟s Basic Data Types (dtypes), Universal Functions (ufuncs), NumPy‟s Special Values, nan and inf, Changing the Shape of an Array, Indexing and Slicing an Array, Broadcasting, Maximum and Minimum Values, Sorting an Array, Structured Arrays, Arrays as Vectors, Logic and Comparisons, Reading and Writing an Array to a File, Statistical Methods: Ordering Statistics, Averages, Variances and Correlations, Histograms. **Polynomials:** Defining and Evaluating a Polynomial, Polynomial Algebra, Root-Finding, Calculus, Classical Orthogonal Polynomials, Fitting Polynomials. Linear Algebra: Basic Matrix Operations, Eigenvalues and Eigenvectors, Linear Scalar Equations Linear Least-Squares Solutions ("Best Fit"), singular value decomposition (SVD) of a matrix. **Section C** **Matplotlib:** Line Plots and Scatter Plots: Plotting on a Single Axes Object, Plot Limits, Line Styles, Markers and Colors, Scatter Plots, Plot Customization and Refinement: Gridlines, Log Scales, Adding Titles, Labels and Legends, Font Properties, Tick Marks, Multiple Subplots, Saving Figures, Bar Charts and Histograms, Pie Charts and Polar Plots, Annotating Plots **SciPy:** Special functions: The Gamma and Beta Functions, The Error Function and Related Integrals, Binomial Coefficients and Exponential Integrals, Definite Integrals of a Single Variable, Integrals of Two and More Variables, Solution of Ordinary Differential Equations. **Learning Outcomes** On successful completion of the course students will be able to - Learn Syntax and Semantics of Python Programming. - Understand the control structures and create Functions in Python. - Understand the Modules and Packages in Python. - Develop Python programs for basic and advanced stages. - Understand programming language and apply programming skill in solving mathematical and computational problems. - Use Python Libraries such as NumPy, Matplotlib, SciPy for scientific computations. **Suggested Books:** 1. Hill, C. (2020). *Learning Scientific Programming with Python*, Second Edition, Cambridge University Press, New York. 2. Dierbach, C. (2012). *Introduction to computer science using python: a computational problem-solving focus*. Wiley Publishing. 3. Morley, S. (2020).*Applying Math with Python,* Packt Publishing Ltd. Birmingham, UK. 4. Lambert, K. A. (2018). *Fundamentals of python: first programs*. Cengage Learning 5. Lutz, M., & Lutz, M. (1996). *Programming python* (volume 8). O\'Reilly Media, Inc. 6. McKinney, W. (2012*). Python for data analysis: data wrangling with pandas, NumPy, and IPython*. O\'Reilly Media, Inc. 7. Taneja, S., & Kumar, N. (2017). *Python programming: a modular approach*. Pearson. 8. Thareja, R. (2017). *Python programming using problem solving approach*. Oxford University Press. **Suggested E-Learning Material** 1. Learn Python for Beginners Course, being offered by Free Code Camp https:/[/www.youtube.com/watch?v=rfscVS0vtbw](http://www.youtube.com/watch?v=rfscVS0vtbw) 2. Lectures: https://www.youtube.com/watch?v=8ndsDXohLMQ&list=PLDsnL5pk7-N\_9oy2RN4A65Z-PEnvtc7rf **Lecture Plan:** **Lect. No.** **Topics to be covered** **Ref./Chapter Section** **Sec** --------------- ---------------------------------------------------------------------------------------------------------------------- -------------------------- --------- 1-2 The Python Shell, Numbers, Variables \[1\] **A** 3-4 Comparisons and Logic -do- 5 Python Objects I: Strings -do- 6-8 Python Objects II: Lists, Tuples and Loops -do- 9-10 Control Flow, File Input/Output -do- 11-12 Functions, Simple Plots and Charts -do- 13 Basic Plotting Labels -do- 14-15 Legends and Customization, More Advanced Plotting -do- 16 Errors and Exceptions -do- 17-18 Dictionaries and Sets, Pythonic Idioms: "Syntactic Sugar" -do- 19-22 Operating- System Services, Modules and Packages -do- 21-22 An Introduction to Object- Oriented Programming, IPython and Jupyter Notebook -do- 23-24 Creating an Array, NumPy‟s Basic Data Types (dtypes), Universal Functions (ufuncs) -do- B 25-26 NumPy‟s Special Values, nan and inf, Changing the Shape of an Array -do- 27-28 Indexing and Slicing an Array, Broadcasting, Maximum and Minimum Values, Sorting an Array -do- 29-30 Structured Arrays, Arrays as Vectors, Logic and Comparisons, -do- **B** 31 Reading and Writing an Array to a File -do- 32-33 Ordering Statistics, Averages, Variances and Correlations, Histograms -do- 34-35 Defining and Evaluating a Polynomial, Polynomial Algebra, Root-Finding, -do- 36-38 Calculus, Classical Orthogonal Polynomials, Fitting Polynomials -do- 39-41 Linear Algebra: Basic Matrix Operations, Eigenvalues and Eigenvectors, -do- 42-43 Linear Scalar Equations Linear Least-Squares Solutions ("Best Fit"), singular value decomposition (SVD) of a matrix. -do- 44-45 Line Plots and Scatter Plots: Plotting on a Single Axes Object -do- C 46-47 Plot Limits, Line Styles, Markers and Colors, Scatter Plots, -do- 48 Plot Customization and Refinement: Gridlines, Log Scales, Adding Titles -do- 49-50 Labels and Legends, Font Properties, Tick Marks -do- 51-52 Multiple Subplots, Saving Figures, Bar Charts -do- 53-54 Histograms, Pie Charts and Polar Plots, Annotating Plots -do- 55 The Gamma and Beta Functions -do- 56-57 The Error Function and Related Integrals, Binomial Coefficients and Exponential Integrals -do- 58-59 Definite Integrals of a Single Variable, Integrals of Two and More Variables -do- 60 Solution of Ordinary Differential Equations. -do- **Evaluation Scheme:** In this course (paper), a student will be evaluated out of 100 marks. Out of which 60 marks would be for final semester examination; and 40 marks would be of continuous assessment (two periodical tests and two assignments). +-------------+-------------+-------------+-------------+-------------+ | ***Evaluati | ***Date*** | ***Total | ***Time*** | ***Comments | | on*** | | Marks*** | | *** | | | | | | | | ***Componen | | | | | | ts*** | | | | | +=============+=============+=============+=============+=============+ | ***Continuo | | | | | | us | | | | | | Assessment* | | | | | | ** | | | | | +-------------+-------------+-------------+-------------+-------------+ | First | 4-7 | 10 | \# | Closed book | | periodical | September, | | | written | | test | 2024 | | | test of 1.5 | | | | | | hr. | | | | | | duration | +-------------+-------------+-------------+-------------+-------------+ | Second | 23-26 | 10 | \# | Closed book | | periodical | October, | | | written | | test | 2024 | | | test of 1.5 | | | | | | hr. | | | | | | duration | +-------------+-------------+-------------+-------------+-------------+ | ***Class* | | | | | | Assessment* | | | | | | * | | | | | +-------------+-------------+-------------+-------------+-------------+ | Attendance | | | | 75% | +-------------+-------------+-------------+-------------+-------------+ | First | 23 August, | 10 | One week | Topics | | Assignment | 2024 | | home | shall be | | | | | assignment | allotted in | | | | | | the | | | | | | | | | | | | class by 7 | | | | | | August 2024 | +-------------+-------------+-------------+-------------+-------------+ | Second | 30 | 10 | One week | Topics | | Assignment | September, | | home | shall be | | | 2024 | | assignment | allotted in | | | | | | the | | | | | | | | | | | | class by 14 | | | | | | September, | | | | | | 2024 | +-------------+-------------+-------------+-------------+-------------+ | | | | | | +-------------+-------------+-------------+-------------+-------------+ | Final | 7-24 | 60 | \# | Closed book | | Examination | December, | | | written | | | 2024 | | | test of 3 | | | | | | hrs. | | | | | | duration | +-------------+-------------+-------------+-------------+-------------+ \# Timing of the assignment submission, periodical and end semester examination would be announced before the examination. **NOTE:** A student is required to attend all classes. It is her duty attend class in time and take up all the assignments, tests, quizzes and other components of evaluation on the schedule dates, and time, failing which she would be awarded zero in that component of evaluation. There is no provision of any re-test/make up. **Consultation Hour:** The students, irrespective of their sections, are free to interact with any member of multi- section course. Students can interact with faculty members during the following hours: **Faculty Member** **Interaction day & time, venue** -------------------- ----------------------------------- Dr. Manish Raghav Wed- Thu (5:00- 6:00 PM), CMS **Dated: 08 /07/2024 \[Dr. Manish Raghav\]**

Use Quizgecko on...
Browser
Browser