GAMR1520: Markup languages and scripting

python logo

Week 1: Introducing python

Back to home

In the first week we will be looking at the fundamentals of programming in python. Beginning with the very basics and moving towards writing basic scripts.

Lectures

Lecture 1.1: Welcome to GAMR1520!

This lecture include an introduction to the module and some background on python. It continues with a rough model of what we mean by a dynamically typed language and some detail about what is happening behind the scenes when the python interpreter executes even the simplest of python expressions.

Lecture 1.2: Compound statements and data

In python, compound statements allow programmers to specify blocks of code which should be executed under certain conditions or in certain contexts. Compound data types enable programmers to create complex, mutable data structures.

Lab exercises

Lab 1.1: Introduction to python

The first lab exercise introduces the IDLE environment and covers the very basic concepts such as literals, operators, variables and assignment. We will begin with simple, one-line expressions in the python interpreter and move on to develop more complex python programmes in our own modules.

Lab 1.2: Compound data types and looping

The second set of exercises looks at the more complex data types and the difference between mutable and immutable types. Combining what we have learned into some short programmes.

Lab 1.3: Problem solving

This final session of week 1 includes a few coding challenges that use what we have learned so far.

Other resources