Professional Documents
Culture Documents
7
An Introduction to Python OCR GCSE Computing
Thanks
Many thanks go to Peter Thompson for his invaluable help, particularly with the sections on lists and dictionaries, and
also to Brian ockwood for proof reading and suggestions for improvements.
Copyright Notice
This book is released under a !reative !ommons B"#$!#%& '.( licence
)http*++creativecommons.org+licenses+by#nc#sa+'.(+,
You are free:
To share*
"ou may copy, distribute - transmit the work. "ou may provide digital or printed copies for students.
To remi.*
"ou may adapt or improve the work.
Under the following conditions:
&ttribution*
"ou must attribute the work to Mark !larkson by including my name on the front cover and in the footer.
$oncommercial*
"ou may not use this work for commercial purposes. /f you are providing printed copies you may only charge
a fee to cover production costs, not profit. "ou must not charge for a digital version of the work.
%hare alike*
/f you alter, transform, or build upon this work, you may distribute the resulting work only under the same or
similar licence to this one. Please let me know if you make significant changes so that / can include them in
my own copies.
Version History
v2.2 )for Python 2.0, 1orked for Python 2.0, from v2.2 of this book )see last page,.
%ome standardising of variable names.
!larke 3ice
v2.2 )for Python ', &dded sections on turtle programming - more list activities.
3eworded most code to give meaningful names to variables.
Mark !larkson
v2.( )for Python ', 3eworded &rrays section to lists.
&dded sections on dictionaries - regular e.pressions.
Moved 45/6 loops ahead of 173 loops.
Mark !larkson
Page 1 by Mark Clarkson
An Introduction to Python OCR GCSE Computing
&n /ntroduction to Python
Table Of Contents
Section 1 - Getting Started
2.2 # Meeting Python
2.2 # 4riting Programs
2.' # &rithmetic
2.8 # !omments
Section 2 - Data Types
2.2 # Variables
2.2 # %trings
2.' # $umbers
2.8 # Boolean
2.9 # ists