• Login
    View Item 
    •   MKSU Digital Repository Home
    • Books
    • School of Pure & Applied Sciences
    • View Item
    •   MKSU Digital Repository Home
    • Books
    • School of Pure & Applied Sciences
    • View Item
    JavaScript is disabled for your browser. Some features of this site may not work without it.

    A Primer on Scientific Programming with Python

    Thumbnail
    View/Open
    Full Text (8.717Mb)
    Date
    2016
    Author
    Langtangen, Hans Petter
    Metadata
    Show full item record
    Abstract
    The aim of this book is to teach computer programming using examples from mathematics and the natural sciences. We have chosen to use the Python programming language because it combines remarkable expressive power with very clean, simple, and compact syntax. Python is easy to learn and very well suited for an introduction to computer programming. Python is also quite similar to MATLAB and a good language for doing mathematical computing. It is easy to combine Python with compiled languages, like Fortran, C, and C++, which are widely used languages for scientific computations. The examples in this book integrate programming with applications to mathematics, physics, biology, and finance. The reader is expected to have knowledge of basic one-variable calculus as taught in mathematics-intensive programs in high schools. It is certainly an advantage to take a university calculus course in parallel, preferably containing both classical and numerical aspects of calculus. Although not strictly required, a background in high school physics makes many of the examples more meaningful. Many introductory programming books are quite compact and focus on listing functionality of a programming language. However, learning to program is learning how to think as a programmer. This book has its main focus on the thinking process, or equivalently: programming as a problem solving technique. That is why most of the pages are devoted to case studies in programming, where we define a problem and explain how to create the corresponding program. New constructions and programming styles (what we could call theory) is also usually introduced via examples. Particular attention is paid to verification of programs and to finding errors. These topics are very demanding for mathematical software, because the unavoidable numerical approximation errors are possibly mixed with programming mistakes. By studying the many examples in the book, I hope readers will learn how to think right and thereby write programs in a quicker and more reliable way. Remember, nobody can learn programming by just reading – one has to solve a large amount of exercises hands on. The book is therefore full of exercises of various types: modifications of existing examples, completely new problems, or debugging of given programs.
    URI
    http://ir.mksu.ac.ke/handle/123456780/6271
    Collections
    • School of Pure & Applied Sciences [197]

    DSpace software copyright © 2002-2015  DuraSpace
    Contact Us | Send Feedback
    Theme by 
    @mire NV
     

     

    Browse

    All of Digital RepositoryCommunities & CollectionsBy Issue DateAuthorsTitlesSubjectsBy Submit DateThis CollectionBy Issue DateAuthorsTitlesSubjectsBy Submit Date

    My Account

    LoginRegister

    DSpace software copyright © 2002-2015  DuraSpace
    Contact Us | Send Feedback
    Theme by 
    @mire NV