Overview

Teaching: min
Exercises: 10 min
Questions
  • How do I know my code runs?

Objectives
  • Set up the example script

Setting up an example

  1. Create a new repository on github
  2. Clone it to your computer
  3. Inside create a demean_age.py file
import numpy as np

age = np.loadtxt("participants.tsv", skiprows=1, usecols=3)

mean_age = sum(age)/len(age)

np.savetxt("demeaned_age.txt", age-mean_age)

print("done!")
  1. Download this data file and put it next to the .py file

Tasks:

Key Points