Python Programming

Module aims

This module aims to give you fundamental programming skills in Python. It equips you with skills for developing algorithms to solve practical problems, and programming tools and skills to enable you to implement these as programs in Python.  You will also learn good software engineering and programming practices for writing efficient and scalable programs. The skills acquired from this module can be applied to other modules in your degree.

Learning outcomes

After the module, you will be able to:
- construct algorithms to solve computational problems and tasks using computers;
- implement procedural and object-oriented programming solutions in Python;
- create, select, and apply appropriate techniques and relevant library software in Python to solve a given problem;
- apply suitable software engineering practices to effectively structure, design, develop, and evaluate programs. 

Module syllabus

The module equips you with programming tools and skills to enable you to write programs to solve practical problems, which can be applied to other modules in your degree. It integrates a range of programming, computer science and software engineering topics.
- Fundamental programming constructs in Python (variables, data types and structures; control flow and repetition; functions; object-orientation)
- Python standard library (string manipulation, file manipulation, command-line interfaces)
- Intermediate and advanced Python programming concepts and tools (exception handling, regular expressions, lambda and higher order functions, HTTP requests, Python decorators)
- Software Engineering practices (abstraction and modularity; coding style and conventions; software testing and debugging; refactoring)
- Algorithms and problem solving techniques
- Introduction to external Data Science libraries (NumPy, Pandas, etc.)    

Teaching methods

You will learn through a combination of live lectures, supported laboratory sessions, and guided materials for self-study and practice. Regular sets of formative coding exercises will be provided. Teaching assistants, all expert in Python, will be available to offer you detailed advice on algorithm design and programming in Python during the laboratory sessions.

An online service will be used as an open discussion forum for the module.

Assessments

There will be assessed coursework assignments contributing to 20% of the module grade in total. These are practical programming exercises, for which you will receive detailed feedback. The exercises will be subject to automated testing to help diagnose issues with the implementations.

The final examination, contributing to 80% of the module grade, will be a time-constrained computer-based programming test. Formative assessments include unassessed coding exercises.        

You will be given written feedback on the assessed coursework. Feedback on the formative exercises will be given in class. The lecturer and teaching assistants will be available to answer your questions and provide direct verbal feedback during the laboratory sessions.

Reading list

Core reading

Supplementary reading

Module leaders

Dr Josiah Wang