COMP S258 Computer Programming and Problem Solving is designed to create a structured yet stimulating environment in which you can learn the fundamental concepts of structured programming.
The following table provides an overview of the course (a brief description of each unit is provided later in this section), showing the number of weeks expected for completing each unit.
Unit | No. of weeks |
1 | Basics of programming | 3 |
2 | Decision and repetition structures | 4 |
3 | Modular programming | 5 |
4 | Built-in data structures and exceptions | 5 |
5 | Introduction to problem solving | 4 |
6 | Searching and sorting | 5 |
7 | Intermediate data structures | 4 |
8 | Data analysis | 4 |
Revision | 1 |
Total | 35 |
Each study unit / study guide involves three to five weeks' worth of work. You are suggested to draw up a study schedule and stick to it by exercising discipline and will. Your attitude will be very important to success in the distance learning mode — be progressive and willing to try again and again.
The suggested number of weeks of study indicates the length of each study unit / study guide. You can adjust this based on your own circumstances.
The course is structured so that each unit builds upon previous knowledge. Each unit contains different features to help you study, but you are typically required to:
- read the study units / study guides and the textbook;
- test your comprehension and analytical skills by working through activities, self-tests and programming segments that appear in the unit;
- complete the assignments; and
- do other tasks, e.g. check out relevant information from the Internet.
The following provides a brief description of the units.
Unit 1 — Basics of programming
This unit introduces the essential components of a computer, including hardware and software. It then describes the history of development of programming languages from machine language, assembly language and various types of high-level programming languages. It also explains the characteristics of Python programming language as one of the high-level programming languages, demonstrates how to install a Python interpreter and a suitable programming environment. The unit finishes with a section on the software development cycle, and introduces how to write a simple program with input, output, variables and operations.
Unit 2 — Decision and repetition structures
This unit introduces the decision and repetition structures, the programming constructs that make programs appear to be thinking and working efficiently. The basic principles of sequential execution of program statements and the decision structures that make execution conditional are explained. Then the way to repeat the execution of statements by repetition structures — in particular condition-controlled loops (while statements) and count-controlled loops (for statements) — is demonstrated. The unit also explains additional data types and operations that enable the development of more capable programs.
Unit 3 — Modular programming
This unit introduces the concept of modular programming using functions for implementation. It explains the methods of function definition and function usages in Python programming. The benefits of modular programming, which is breaking down a program into modules, are highlighted and the implementation of modular programming with functions is demonstrated. A number of programming concepts associated with functions are also explained.
Unit 4 — Built-in data structures and exceptions
This unit introduces four primitive data structures in Python, namely list, tuple, dictionary and file. Examples of using these data structures in problem solving are given. The file structure is not strictly a true data structure but is abstracted as one. Key file operations are explained. The unit also introduces some common exceptions that happen in Python programs and ways of handling exceptions.
Unit 5 — Introduction to problem solving
This unit discusses well-proven principles, techniques and best practices for problem solving that will start you on the road to becoming an able programmer. The unit begins with an overview of general problem-solving techniques that can be applied to programming projects, whether large or small. It provides an overview of where algorithms and data structures are used in practical applications. It outlines the popular categories of existing algorithms for solving a variety of problems and warms you up to the idea of selecting and implementing the right algorithm for your needs. Lastly, the unit looks at the use of recursion to solve various programming problems. The process of creating recursive functions is presented along with classic examples such as the Towers of Hanoi.
Unit 6 — Searching and sorting
This unit is concerned with two important problems in computing — searching and sorting. In this unit, you will study the key searching and sorting algorithms and their characteristics. By implementing these algorithms and conducting experimental analysis, you will discover how algorithm strategy and design can impact the complexity, speed and efficiency of the programs you write. You will also learn how to analyse the performance of algorithms independently of the hardware and software platform used to run a program. This gives you a consistent framework for comparison and for determining the best algorithm or solution for a particular problem.
Unit 7 — Intermediate data structures
This unit discusses intermediate data structures such as stacks, queues, trees and hash tables. It examines how each data structure organizes individual data items and the operations available for managing the collection of data. It shows different ways to implement these data structures in Python. By examining examples of how these data structures are used in real world situations, you will learn how some data structures are better suited than others to particular problems.
Unit 8 — Data analysis
Data analysis requires the development and use of applications for collecting data and then cleaning, processing and visualizing it. Python comes with libraries and built-in features that greatly facilitate data analysis and processing. Since you will have had a good grasp of fundamental Python programming by the time you reach this unit, this unit introduces the main Python programming elements and techniques that are specifically used in data analysis. It illustrates how data gathering, cleaning, merging and integration can be done. It demonstrates some of the data analysis methods that are available. You will also learn the significance of data visualization and take a look at some popular data visualization methods and libraries in Python.