Cambridge IGCSE & O Level Computer Science Programming Book for Python Sample

Page 8

We are working with Cambridge Assessment International Education towards endorsement of this title. Any references or material related to answers, grades, papers or examinations are based on the opinion of the author(s). CAMBRIDGE IGCSE™ & O LEVEL COMPUTER SCIENCE: PROGRAMMING BOOK

Introduction

LE

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.

M

P

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.

A

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

S

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.

viii Original material © Cambridge University Press 2021. This material is not final and is subject to further changes prior to publication.


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.