CE5333: Python Programming

School Continuing and Professional Education
Department Code LEARN
Module Code CE5333
External Subject Code 100956
Number of Credits 10
Level L5
Language of Delivery English
Module Leader Dr Zbigniew Sobiesierski
Semester Autumn Semester
Academic Year 2022/3

Outline Description of Module

By and large, Python has been developed to raise the quality of programming in the scripting world. This module is designed to cover the essentials of the Python language. This will be done using the bottom up approach, from built-in object types, to statements, to program units and, finally, to the development of applications. Students will learn Python through formal lectures and weekly programming exercises.This course extends the basic concepts learnt in Java I and is taught along similar lines. Topics covered include exception handlers using try, catch and finally blocks, introduction to inheritance, interfaces, abstract and final classes, introduction to event handling, the MouseListener interface and the MouseAdapter class, use of the FlowLayout, BorderLayout, GridLayout and GridBagLayout layout managers with both the Abstract Windowing Toolkit (AWT) and the Swing Toolkit, using dialog windows with applications with more than one frame, adding components to the graphical frame. Assessed work will include the creation of a number of applications with a graphical user interface (GUI).

On completion of the module a student should be able to

  • Create and run Python scripts.
  • Enter data via the keyboard during execution of a Python script.
  • Use the built in functions numbers, strings, lists and dictionaries in Python scripts.
  • Write data to text files and read data from the files created.
  • Create user defined functions.
  • Create modules for use by other Python scripts.
  • Use exception handling in Python scripts.
  • Use pattern matching module re to obtain matching strings.
  • Use database management to save keyed data.

How the module will be delivered

This module includes a mix of traditional lectures and laboratory sessions. There will be 11 meetings of 3 hrs  Each meeting starts with a lecture and finishes with a laboratory session.

33 contact hours.

Skills that will be practised and developed

Whilst studying this module, students will practise

  • writing Python scripts.
  • creating modules for use by other users.
  • saving information to both text files and database files.
  • analysing a programming problem and write a well-structured Python script.

Assessment Breakdown

Type % Title Duration(hrs)
Written Assessment 100 Course Work N/A

Syllabus content

Introduction to the Python language.

Running and compiling programs.

Introduction to the built-in object types such as numbers, strings, lists and dictionaries.

Introduction to files.

Introduction to user defined functions.

Organisation of Python code into modules.

Pattern Matching.

Exception handling.

Database Management

Built-in tools.

Introduction to Python classes.

Specialised libraries.

 


Copyright Cardiff University. Registered charity no. 1136855