Physics MSc & CDT Programming Induction: Collaborative Notes

http://tiny.cc/ucl_sc

:tada: Welcome!

:calendar: Thursday 28th Sept - Friday 29th Sept

:hammer_and_wrench: Setup Instructions

Go to the workshop website and follow the instructions for your operating system to setup each of:

Exercises

This document: http://tiny.cc/ucl_sc

Lesson Material

course notes

data


Staff

DAY 1:

Instructors: Ben (Bash) & David Pérez-Suárez(Git)
Helpers: Tara, Nathan, David Wong, Elizabeth (AM), Marin (PM)

DAY 2:

Instructors:
Helpers: Tara, Nathan, Elizabeth (AM), Marin (PM)

Notes

Contribute to this document by adding notes about the class below.

Bash

Git

Python

  1. Create a plot showing the standard deviation (numpy.std) of the inflammation data for each day across all patients.

  2. Add your new plot to your previous group of plots

  3. Change the plot figure so the plots are vertical and not horizontal

  4.  # slice only the last 4 characters of the string
    
    
     string_for_slicing = 'Observation date: 02-Feb-2013'
     # slice only the last 4 items in the list 
     list_for_slicing = [['fluorine', 'F'],
                     ['chlorine', 'Cl'],
                     ['bromine', 'Br'],
                     ['iodine', 'I'],
                     ['astatine', 'At']]
    
  5. beatles = "In an octopus's garden in the shade"
    # use string slicing to print `I notpssgre ntesae` from the `beatles` variable
    
  6. # write a loop that sums up every element in this list
    numbers = [124, 402, 36]
    # should be 562
    
x = 5 coefs = [2, 4, 3] y = coefs[0] * x**0 + coefs[1] * x**1 + coefs[2] * x**2 print(y) # write a loop using enumerate do calculate the polynomial

Wrap up