Learning Objectives Intro to Python - UCL/RCPSTrainingMaterials GitHub Wiki
Introduction to Research Programming (with Python)
Lesson 1: Introduction
Questions
- What is Python?
- Why learning Python?
- What's the Jupyter notebooks?
- How do we use Jupyter notebooks?
Objectives
- Recognise when using a notebook is useful.
- Use a notebook either by clicking or keyboard shortcuts.
- Generate different formatted text and code blocks.
Lesson 2: Example data analysis
Questions
- Why write software to manage your data and plots?
- Why do we need to import libraries?
- How do we write comments?
- Why are functions useful?
- What allows looping?
Objectives
- Identifying the elements of a program
Lesson 3: Variables
Questions
- What's a variable?
- What happens to a variable when it gets reassigned?
- How do you know the type of a variable?
- How do we read the errors?
- How the notebook keep track of the variables in cells?
Objectives
- Illustrate the concept of variable with labels and boxes.
- Recognise and test the different variables types.
- Predict the behaviour of variables through different cells.
Lesson 4: Using Functions
Questions
- How are functions used?
- What's a method?
- How can you get help on functions?
Objectives
- Recognise methods and functions.
- Use
help
and?
to read the documentation of functions.
Lesson 5: Types
Questions
- What's a type?
- What's the similarities between strings and lists?
- How we unpack the content of a sequence over multiple variables?
Objectives
- Identify types.
- Predict the output of
type(x)
- Use appropriated methods over each type.
- Match properties of string with lists.
- Compare lists of lists with matrices.
Lesson 6: Containers
Questions
- When something is contained in an object?
- What is mutability?
- What other types of containers are available?
- What is Identity? What is equality?
Objectives
- Interpret the result of
in
and for what it can be used. - Attribute to the data type the differences with memory handling.
- Use tuples and lists
- Predict when to use identity or equality.
Lesson 7: Dictionaries
Questions
- What's a dictionary?
- What are the parts of a dictionary?
- Which type can be used as keys?
- What's a set?
Objectives
- Identify a dictionary and a set.
- Recognise differences between them.
- Carry out binary operations on set.
Lesson 8: Data structures
Questions
- How can we create a complex data structure?
Objectives
- Implement a data structure.
- Distinguish different approaches.
- Judge which one is more readable, efficient, easier to use,..
Lesson 9: Control and Flow
Questions
- What's a Turing complete machine?
- How to make the program to take decisions?
- What comparison operators can we use?
- How do the variables evaluate?
Objectives
- exemplify the various levels of decision making on a program.
- recall the need of indentation.
- Execute comparisons between variables.
Lesson 10: Iteration
Questions
- What's a loop?
- What can we use to iterate over?
- How can we exit from a loop?
Objectives
- Understand why loops are useful.
- Recall the need of indentation.
- Implement a mix of loops and control flow to extract information from a data structure.
Lesson 11: Comprehensions
Questions
- What's comprehension?
- what kind of operations can we run over a list?
- What objects can we built using comprehension?
Objectives
- Translate a loop into a comprehension.
- Execute nested comprehensions.
- Integrate with a data structure.
Lesson 12: Defining Functions
Questions
- How do we create a function?
- What type of arguments can have?
- How can I provide help?
Objectives
- Infer the output of a simple function.
- Detect possible side effects.
- Construct a function.
- Write docstrings.
Lesson 13: Using libraries
Questions
- Why do we use libraries?
- How are they loaded and used?
Objectives
- Identify how to load a library.
- Recognise when overriding can happen.
Lesson 14: Working with files
Questions
- How can I read data stored in files?
- Why should we plan for different operative systems?
- What do we need to keep in mind when reading strings?
- How does working with files change when they are stored remotely (Internet)?
- Which format accommodate better our data?
Objectives
- Implement a reader with and without a context manager.
- Familiarise with the
os
module and generate readers that can work at different computers. - Identify different type of strings python can handle.
- Recall the modules needed.
- Understand different properties for different file formats.
Lesson 15: Plotting
Questions
- How do I represent data visually?
- How can I show more than one plot at once
Objectives
- Carry out generation of simple plots.
- Recognise what are figures and axes.
Lesson 16: Numerical Python
Questions
- How do I operate and represent multi-dimensional arrays in python?
- What is broadcasting?
- How does numpy handles memory?
Objectives
- Recognise differences between numpy's arrays and other data structures in python and the operations available.
- Judge when and where
np.newaxis
is needed for operating matrices. - Distinguish between
copy
and[:]
views of an array.