2 minute read

Subroutines

Next Article
GUI applications

GUI applications

Introduction

This fully revised edition reflects the new Cambridge IGCSE™, IGCSE (9–1) and O Level Computer Science syllabuses (0478/0984/2210). It includes all new tasks and challenges based on feedback from readers and teachers. But the aim of this edition remains true to the original: to provide a programming book that specifically covers the material relevant to the syllabuses. This book will also provide you with a starting point in the exciting and rewarding process of being able to create your own computer programs. I hope you find the book a helpful step into the world of computer science.

Language

The syntax and structures used to implement programming techniques vary across different languages. This book is entirely based around Python 3, one of the three recommended languages for the syllabuses. Similar books are also available which focus on Microsoft® Visual Basic and Java programming languages. Python has, at its core, the principle that code should be easy to read. This means that in many ways it is very close to pseudocode. The pseudocode structure used in the examination papers uses a language-neutral style. You will need to become familiar with this, and be able to read and follow the logic easily. When writing your own pseudocode the most important thing is to ensure your logic is clear. Pseudocode is meant to be a way of expressing clearly the logic of a program, free from the worries of syntax. Python also has a recommended style guide that can be found at the python.org website. Here, for example, it is recommended that Python programmers name functions and variables with descriptive all lower case characters separated by underscores, for example, my_variable. As it could be very confusing to keep swapping naming conventions, this book assumes that you are going to stick, wherever possible, to the correct Python style but be a flexible enough thinker to be able to read other pseudocode styles. It is recommended that when preparing for examinations, you ensure you are aware of the exam board variable naming style.

Support

As you work your way through the exercises in this book you will develop your computational thinking skills, independent of any specific programming language. You will do this through the use of program design tools such as structure diagrams and flowcharts. You will also make use of pseudocode, a structured method for describing the logic of computer programs. It is crucial that you become familiar with these techniques. Throughout this book, all the programming techniques are demonstrated in the non-language-specific format required, with the exception of variable and function naming.

This article is from: