preface shift in popularity from these compiled languages to more high-level and easier-toread languages like matlabpythonrmaplemathematicaand idlfor instance this latter class of languages is computationally less efficientbut superior with respect to overall human problem solving efficiency this book emphasizes how to think like programmerrather than focusing on technical language details thusthe book should put the reader in good position for learning other programming languages laterincluding the classic onesfortrancand +how this book is different there are numerous texts on computer programming and numerical methodsso how does the present one differ from the existing literaturecompared to books on numerical methodsour book has much stronger emphasis on the craft of programming and on verification we want to give students thorough understanding of how one thinks about programming as problem solving method and how one can be sure that programs are correct (wellyou can never be completely surebut we show how you can provide convincing evidence for correctnesseven though there are lots of books on numerical methods where many algorithms have corresponding computer implementation (seee [ - - the latter two are the only texts we know that apply python)it is assumed that the reader "can programbeforehand the present book teaches the craft of structured programming along with the fundamental ideas of numerical methods furthermorewe have so far not found any other numerical methods book that has strong emphasis on verifying implementations in this bookunit testing and corresponding test functions are introduced early on we also put much emphasis on coding algorithms as functionsas opposed to "flat programs"which often dominate in the literature and among practitioners functions are reusable because they utilize the general formulation of mathematical algorithm such that it becomes applicable to large class of problems there are also numerous books on computer programmingbut to our knowledge only one [ that aims to teach how to think about programming in the context of numerical methods and scientific applications that book [ has its primary focus on teaching python and is very comprehensive introduction to python as language and the thinking about programming as computer scientist sometimes one needs text that does not go so deep into the language-specific detailsbut instead targets the shortest path to reliable mathematical problem solving through programming with this attitude in minda lot of topics were left out of the present booksimply because they were not strictly needed in the mathematical problem solving process examples of such topics are object-oriented programming and python dictionaries (of which the latter omission is possibly subject to more debateif you find the present book too shallow[ might be the right choice for you that source should also work nicely as more in-depth successor of the present text whenever the need for structured introduction to programming arises in science and engineering coursesthis book may be your optioneither for self-study or for use in organized teaching the thinkinghabitsand practice covered in couple of hundred pages will put readers in firm position for utilizing and understanding the power of computers for problem solving in science and engineering