Search

Introduction to programming for physicists and materials scientists


  • Introduction
    • Why learning to program?
    • Why Python?
    • Some ingredients
  • A preview
  • Primitive data types, variables and assignments
    • Integers
    • Floats
    • Functions for real numbers
    • Complex numbers
    • Variables and assignments
    • Booleans
    • Formatting of output
  • Control structures
    • For-Loop
    • While-Loop
    • Branches
    • Catching exceptions
  • Functions
    • Defining functions
    • Documentation of functions
    • Local and global variables
    • Recursive funktions
    • Functions as arguments of functions
    • Lambda function
    • Keywords and defaults
  • Complex data types
    • Lists
    • Tuples
    • Strings
    • Dictionaries
  • Input and output
    • Input via command line and keyboard
    • Reading and writing files
  • NumPy/SciPy as example for numerical libraries
    • Installation
    • Arrays and applications
    • Numerical integration
    • Integration of ordinary differential equations
  • Object-oriented programming
    • Classes, attributes and methods
    • Inheritance