Difference between revisions of "Python Old Version"
Nancyvarkey (Talk | contribs) (→Conditional statements and Loops) |
Nancyvarkey (Talk | contribs) (→Functions) |
||
Line 114: | Line 114: | ||
* for and range | * for and range | ||
− | = | + | = Functions = |
* Function definition | * Function definition | ||
* Docstrings | * Docstrings |
Revision as of 17:54, 22 March 2018
IIT Bombay is leading the effort to popularise Python for Scientific Computing in India. This is part of the Free and Open source Software for Science and Engineering Education (http://fossee.in) project, supported by the National Mission on Education through ICT of MHRD (http://spoken-tutorial.org/NMEICT-Intro).
IIT Bombay is using Spoken Tutorials (http://spoken-tutorial.org) to create learning material for FOSS. This is the main page for the organisation of the scripts required for Standard two day workshop we conduct on "Python for Scientific Computing" spoken tutorials.
Contents
- 1 General Information
- 2 Interactive Plotting
- 3 Plotting experimental data
- 4 Plotting experimental data continued
- 5 Handling large files
- 6 Arrays/ Matrices
- 7 Least Square Fit
- 8 Solving Equations
- 9 Ordinary Differential Equations
- 10 Data Types: Numbers
- 11 Strings
- 12 Data Structures: Lists and Tuples
- 13 Data Structures: Dictionaries & Sets
- 14 Conditional statements and Loops
- 15 Functions
Note: Each numbered topic corresponds to a single spoken tutorial. Each bulleted point corresponds to a command or topic that must be covered in the given spoken tutorial.
General Information
This topic will include getting ready with Installation and getting comfortable with the interface which would be used through out the workshop
Installation procedure of Required Packages
For this study plan following packages will be used:
- IPython
- Matplotlib
- NumPy
- SciPy
- Mayavi2
- Scite
- Windows installation (using Enthought Python Distribution(EPD http://www.enthought.com/products/epd.php ))
- Linux installation (using package manager- show only Debian/Ubuntu as example (sudo apt-get install ipython python-numpy python-scipy python-matplotlib mayavi2 scite))
- Mac
Basic usage of IPython interpreter
- Starting (and exiting) the interpreter.
- Getting out of loops.
- Viewing history.
- Saving history to scripts.
- Running scripts inside the interpreter.
Interactive Plotting
- IPython
- Autocompletion
- Help
- Plotting
- Creating simple plots.
- Adding labels and legends.
- Annotating plots.
- Changing the looks: size, linewidth, colors.
Plotting experimental data
- Lists
- Creation of a list.
- Appending to a list.
- Iterating through list.
- Data Processing
- Handling files.
- For loops.
- Plotting the points
Plotting experimental data continued
- loadtxt
- Arrays
- Usage
- Operations
- Statistical functions
Handling large files
- Reading files
- String operations.
- Plotting pie charts.
Arrays/ Matrices
- Creating matrices.
- Accessing and changing elements.
- Concepts of Striding and Slicing.
- Elementary Image processing.
- Matrices operations.
Least Square Fit
Least Square Fit
Solving Equations
- Solving linear equations
- Finding roots pf polynomials
- Roots of non linear equations
- Basics of Functions
Ordinary Differential Equations
Ordinary Differential Equations
Data Types: Numbers
- Data types for numbers
- operators
- type conversion
Strings
- Creating string variables
- Manipulating strings
- I/O operations
- Comments
- Dynamically typed nature
Data Structures: Lists and Tuples
- Lists
- Initialization
- Operations
- Slicing
- Striding
- Tuples
Data Structures: Dictionaries & Sets
- Dictionaries
- Initializing
- Accessing elements
- dict.keys and dict.values
- Sets
- Initializing
- Operations
Conditional statements and Loops
- Writing conditional statements
- While loops
- range function
- for and range
Functions
- Function definition
- Docstrings
- Function arguments
- Default arguments
- Keyword arguments
- Return values