Prerequisites: Python skills

The skill set listed below is covered in both Software Carpentry’s Python workshop and in Data Carpentry’s Ecology workshop with Python. These skills can also be learned through coursework or independent learning.

You need to be able to:

  • Use the assignment operator to create an  int, float, and str variables.
  • Perform basic arithmetic operations (e.g. addition, subtraction) on variables.
  • Convert strings to ints or floats where appropriate.
  • Create a list and alter lists by appending, inserting, or removing values.
  • Use indexing and slicing to access elements of strings, lists, and Numpy arrays.
  • Use good coding practices to comment your code and choose appropriate variable names.
  • Write a for loop that increments a variable.
  • Write conditional statements using ifelif, and else.
  • Use comparison operators (==!=<<=>>=) in conditional statements.

Operations with data files:

  • Read data from a file using read(), readline(), and readlines().
  • Open, read from, write to, and close input and output files.
  • Use print() and len() to inspect variables.

The following skills are useful, but not required:

  • Apply a function to an entire Numpy array or to a single array axis.
  • Write a user-defined function. If you are signed up, or considering signing up for a workshop, and aren’t sure whether you meet these requirements, please get in touch with the workshop instructors or host.