Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
10327 views
ubuntu2004
Kernel: Python 3 (system-wide)

Course structure

WeekWeek beginningLectureSelf-study NotebooksExercise NotebooksWorkshop NotebooksAssessment
121 Sept.PythonPython 1 to 4Python 3 and 4
228 Sept.Python 5 to 9Python 5 to 9Python Workshop 1
35 Oct.Python 10 to 14Python 10 to 14Python Workshop 2Python 1
412 Oct.Python 15 to 18Python 15 to 18Python Workshop 3Python 2
519 Oct.Python 19 to 23Python 19 to 23Python Workshop 4Python 3
626 Oct.EDAEDA 1 to 3EDA 1 to 3Python Workshop 5Python 4
72 Nov.EDA 4 to 7EDA 4 to 7EDA Workshop 1EDA 1
89 Nov.EDA 8 to 12EDA 9, 10 and 12EDA Workshop 2EDA 2
916 Nov.EDA Workshop 3EDA 3
1023 Nov.Data Analysis

Python self-study and workshop notebooks

1 - Coding in Jupyter Notebooks

  1. Command mode and edit mode

  2. Markdown cells

  3. Code cells

  4. Running code cells

  5. The Jupyter Kernel

    • Restarting the kernel

  6. Help with Jupyter Notebooks

2 - Hello World

  1. Hello, World!

  2. Making mistakes and Python errors

  3. Comments

  4. Using google to help you code

3 - Numbers and arithmetic

  1. Simple arithmetic

  2. Jupyter Notebook output

  3. Precedence: The order of calculations matter

  4. Number types: integers and floats

  5. Integer division and remainder (modulus)

  6. Rounding numbers

  7. Very large and very small numbers: Scientific E-notation

4 - Numerical variables

  1. What are variables and why do we need them?

  2. Properties of Python variables

  3. Printing the value and type of a variable

  4. The value of a variable can change

  5. Variables can be used in arithmetic

  6. Make your output meaningful with f-strings

  7. What should I call my variable?

  8. Variable naming guidelines

    • Reserved keywords in Python

Python Workshop 1: Getting started with Python

5 - Strings I - working with text

  1. Length of a string

  2. String variables

  3. The empty string

  4. Adding to the end of a string: Concatenation

  5. Input

  6. Casting: Converting a string to a number

  7. Newlines and tabs: Escape characters

6 - Strings II - indicies and substrings

  1. Accessing characters in a string

  2. Accessing several characters: Substrings

  3. Stepping over characters

    • Reversing a string

7 - Strings III - string methods

  1. Manipulating and interrogating strings with string methods

    • Getting the index of a character or substring

    • Converting a string to lowercase

8 - Making decisions I - conditional statements

  1. if

    • Indentation matters: IndentationError

  2. if ... else

  3. if ... elif ... else

  4. Double equals symbol, ==

  5. Testing strings

    • Test the value of a string

    • Test if a character is in a string

    • Test if a word is in a string

  6. Tables of operators

9 - Making decisions II - combined and nested conditions

  1. Combined conditions

    • The and operator

    • The or operator

  2. Combining and and or operators

  3. Nested conditions

  4. Booleans

Python Workshop 2: Strings and making decisions

10 - Loops I - strings

  1. Looping through a string

  2. The iterating variable

  3. Counting "f"s

  4. Naming the iterating variable

11 - Lists

  1. A list is a sequence of items

  2. Length of a list

  3. Creating an empty list

  4. Adding items to a list: append()

  5. Sorting a list

  6. Accessing values in a list

    • Accessing individual items

    • IndexError

    • Accessing multiple items: slicing

  7. Testing membership of a list

  8. Getting the index of an item

12 - Loops II - lists

  1. Looping through a list of strings

  2. Looping through a list of numbers

    • Sum the values in a list

    • Average value of items in a list

13 - Loops III - controlling and nesting loops

  1. Breaking out of a loop: break

  2. Nested loops

14 - Loops IV - looping by index

  1. How range() works

  2. Using range() to loop through strings

    • A realistic example of looping through a string: Extracting codons

  3. Using range() to loop through lists

  4. Simultaneous looping through multiple lists

Python Workshop 3: Lists and loops

15 - Dictionaries I - the basics

  1. Dictionaries comprise items of key:value pairs

  2. Dictionary keys are unique

  3. Dictionary values do not need to be unique

  4. Getting the number of items

  5. Getting the value of a key

    • KeyError

  6. Adding an item

  7. Change the value of an item

  8. Creating an empty dictionary

  9. Test if a key is already in a dictionary

16 - Dictionaries II - looping

  1. Looping through a dictionary

  2. Looping through keys and values simultaneously

    • Loop through the keys and use them to get each item's value

    • Loop through items

  3. Loop through sorted keys

  4. Loop through reverse sorted keys

  5. Loop through sorted values: Advanced Python

17 - Dictionaries III - counting things

18 - Dictionaries IV - lookup table

Python Workshop 4: Dictionaries

19 - Functions I - defining

  1. A simple function

  2. How functions work

  3. Functions must be defined before they are called

  4. Doc-strings

20 - Functions II - passing arguments

  1. Passing values (arguments) to functions

  2. Variables can be arguments

  3. Lists and dictionaries can be arguments

  4. Functions can be arguments

  5. Functions can take more than one argument

  6. Parameters can have a default value

21 Functions III - returning values

  1. Returning values from a function

  2. Functions can return any type of variable

  3. Functions can return more than one value

22 Functions IV - functions can call functions

23 Modules

Python Workshop 5: Functions and modules