Web-Books
in the Austria-Forum
Austria-Forum
Web-Books
Informatik
Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Volume Second Edition
Page - XV -
  • User
  • Version
    • full version
    • text only version
  • Language
    • Deutsch - German
    • English

Page - XV - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Volume Second Edition

Image of the Page - XV -

Image of the Page - XV - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Volume Second Edition

Text of the Page - XV -

Contents 1 The First FewSteps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1 What Is aProgram?AndWhat IsProgramming? .. . . . . . . . . . . . . . . 1 1.1.1 InstallingPython . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.2 A PythonProgramwithVariables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2.1 TheProgram.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2.2 Dissecting theProgram .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.2.3 WhyUse Variables? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.2.4 MathematicalNotationVersusCoding . . . . . . . . . . . . . . . . . 10 1.2.5 Write andRun YourFirst Program . . . . . . . . . . . . . . . . . . . . 10 1.3 A PythonProgramwitha LibraryFunction. . . . . . . . . . . . . . . . . . . . . 12 1.4 ImportingfromModulesandPackages . . . . . . . . . . . . . . . . . . . . . . . . 14 1.4.1 ImportingforUse Without Prefix. . . . . . . . . . . . . . . . . . . . . . 14 1.4.2 ImportingforUse with Prefix. . . . . . . . . . . . . . . . . . . . . . . . . 17 1.4.3 ImportswithNameChange . . . . . . . . . . . . . . . . . . . . . . . . . . 18 1.4.4 ImportingfromPackages . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 1.4.5 TheModules/PackagesUsed in ThisBook. . . . . . . . . . . . . . 19 1.5 A PythonProgramwithVectorizationandPlotting . . . . . . . . . . . . . . 19 1.6 Plotting,Printingand InputData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 1.6.1 PlottingwithMatplotlib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 1.6.2 Printing:TheStringFormatMethod . . . . . . . . . . . . . . . . . . . 27 1.6.3 Printing:The f-String . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 1.6.4 User Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 1.7 ErrorMessagesandWarnings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 1.8 ConcludingRemarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 1.8.1 ProgrammingDemandsYouto Be Accurate!. . . . . . . . . . . . 34 1.8.2 Write ReadableCode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 1.8.3 Fast CodeorSlowerandReadableCode? . . . . . . . . . . . . . . 35 1.8.4 DeletingDataNoLonger inUse . . . . . . . . . . . . . . . . . . . . . . 36 1.8.5 CodeLinesThatAreTooLong . . . . . . . . . . . . . . . . . . . . . . . 36 1.8.6 Where toFindMore Information? . . . . . . . . . . . . . . . . . . . . . 36 1.9 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 xv
back to the  book Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Volume Second Edition"
Programming for Computations – Python A Gentle Introduction to Numerical Simulations with Python 3.6, Volume Second Edition
Title
Programming for Computations – Python
Subtitle
A Gentle Introduction to Numerical Simulations with Python 3.6
Volume
Second Edition
Authors
Svein Linge
Hans Petter Langtangen
Publisher
Springer Open
Date
2020
Language
English
License
CC BY 4.0
ISBN
978-3-319-32428-9
Size
17.8 x 25.4 cm
Pages
356
Keywords
Programmiersprache, Informatik, programming language, functional, imperative, object-oriented, reflective
Category
Informatik
Web-Books
Library
Privacy
Imprint
Austria-Forum
Austria-Forum
Web-Books
Programming for Computations – Python