Introduction to Scientific Programming With Python
Book information
Description
This open access book offers an initial introduction to programming for scientific and computational applications using the Python programming language. The presentation style is compact and example-based, making it suitable for students and researchers with little or no prior experience in programming. The book uses relevant examples from mathematics and the natural sciences to present programming as a practical toolbox that can quickly enable readers to write their own programs for data processing and mathematical modeling. These tools include file reading, plotting, simple text analysis, and using NumPy for numerical computations, which are fundamental building blocks of all programs in data science and computational science. At the same time, readers are introduced to the fundamental concepts of programming, including variables, functions, loops, classes, and object-oriented programming. Accordingly, the book provides a sound basis for further computer science and programming studies. Preface Contents Chapter 1 Getting Started with Python 1.1 The First Example: Hello, World! 1.2 Different Ways to Use Python Chapter 2 Computing with Formulas 2.1 Programming Simple Mathematics 2.2 Variables and Variable Types 2.3 Formatting Text Output 2.4 Importing Modules 2.5 Pitfalls When Programming Mathematics Chapter 3 Loops and Lists 3.1 Loops for Automating Repetitive Tasks 3.2 Boolean Expressions 3.3 Using Lists to Store Sequences of Data 3.4 Iterating Over a List with a for Loop 3.5 Nested Lists and List Slicing 3.6 Tuples Chapter 4 Functions and Branching 4.1 Programming with Functions 4.2 Function Arguments and Local Variables 4.3 Default Arguments and Doc Strings 4.4 If-Tests for Branching the Program Flow 4.5 Functions as Arguments to Functions 4.6 Solving Equations with Python Functions 4.7 Writing Test Functions to Verify our Programs Chapter 5 User Input and Error Handling 5.1 Reading User Input Data 5.2 Flexible User Input with eval and exec 5.3 Reading Data from Files 5.4 Writing Data to Files 5.5 Handling Errors in Programs 5.6 Making Modules Chapter 6 Arrays and Plotting 6.1 NumPy and Array Computing 6.2 Plotting Curves with Matplotlib 6.3 Plotting Discontinuous and Piecewise-Defined Functions 6.4 Making a Movie of a Plot 6.5 More Useful Array Operations Chapter 7 Dictionaries and Strings 7.1 Dictionaries 7.2 Example: A Dictionary for Polynomials 7.3 Example: Reading File Data to a Dictionary 7.4 String Manipulation Chapter 8 Classes 8.1 Basics of Classes 8.2 Protected Class Attributes 8.3 Special Methods 8.4 Example: Automatic Differentiation of Functions 8.5 Test Functions for Classes 8.6 Example: A Polynomial Class Chapter 9 Object-Oriented Programming 9.1 Class Hierarchies and Inheritance 9.2 Example: Classes for Numerical Differentiation 9.3 Example: Classes for Numerical Integration Index
Similar books
Solving Ordinary Differential Equations in Python
2023 · PDF
Introduction to Scientific Programming with Python
2020 · PDF
Computing the Electrical Activity in the Heart
2006 · PDF
Computing the Electrical Activity in the Heart
2010 · PDF
MySQL® Notes for Professionals book
2018 · PDF
MrExcel 2022: Boosting Excel
2022 · PDF
MrExcel 2022: Boosting Excel
2022 · PDF
Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36
2010 · PDF