FEniCS Project Banner

Experience with Using Python for Teaching Scientific ComputingΒΆ

Author:Hans Petter Langtangen (hpl at simula.no)
Date:May 15, 2014

Summary. This essay explains why and how we have chosen Python as the language of choice for teaching scientific computing at the University of Oslo. By teaching students Python and numerics from day one, various bachelor programs have taken advantage of this knowledge and reformed classical science courses by using programming and numerical simulation to solve mathematical problems. We have learned several lessons:

  • The choice of Python as a teaching language for scientific computing has been a great success and is highly recommended.
  • Python provides a natural, continuous glue between MATLAB-style “flat programs”, procedural programming, object-oriented programming, generative programming, and even functional programming.
  • It is possible to treat quite advanced problems very early in the studies. For example, at the end of the first semester our students implement an object-oriented toolbox for solving a wide class of nonlinear vibration problems (!).
  • Replacing classical mathematical solution techniques by programming and numerical simulation in science courses is indeed challenging, but possible and often natural. The experience is very positive: the relevance of mathematics is much increased and programming is a great pedagogical tool for learning abstract mathematical thinking.
  • Students come with all sorts of laptops. Force everyone to use Ubuntu as this minimizes the technical hassle with installing complicated mathematical software.
_images/python5.jpg

PDF version of this document (for printing)