book 1 cover
Python Basics can currently be ordered from amazon
(ISBN: 9781107658554)
or directly from Cambridge University Press:
Python Basics at CUP


This is the Coding Club: Python Basics home page. Here you will find a short summary of each chapter of the book.

The answers to the challenges can be found on the Resources page. If you get stuck, you can download the complete source code from the same page.

Python Basics was the first book to be published.

The programming language Python 3 is used to introduce the principles of programming. In this book you learn how to write simple programs that include My8Ball, a number guessing game and a small graphical application called MyEtchASketch.

More importantly, by the end of the book, you should be able to write your own short programs and be able to fully customise both the look and how the various programs you have made to your own liking.

Chapter 1

Ch.1 - Python, IDLE & Your First Program:
In this Chapter you are going to:

   >>> Meet the programming language you are going to learn about.
   >>> Meet IDLE which will help organise and run your code easily.
   >>> Check that your computer is set up correctly.
   >>> Write and run your first program.

Chapter1.pdf

Chapter 2

Ch.2 - Some text, some maths & going loopy:
In this Chapter you will be able to:

   >>> Learn how to do some more with texts.
   >>> Get Python to do some maths for you.
   >>> Learn about how loops work.
   >>> Learn lots of useful operators.

Chapter 3

Ch.3 - Readable code and My8Ball Game:
In this Chapter you will be able to:

   >>> Write and save a Python file using Script Mode.
   >>> Learn how to write clear readable code.
   >>> Run a Python file.
   >>> Learn about how to get user input.
   >>> Learn about if and else clauses.
   >>> Write a short game called MyMagic8Ball.


Here is a movie of this chapter's project: my8ball.py

Chapter 4

Ch.4 - Functions:
In this Chapter you will be able to:

   >>> Learn about functions .
   >>> Write your own functions.
   >>> Create a number guessing game.



Here is a movie of this chapter's project: myNumber.py

Chapter 5

Ch.5 - MyEtchASketch:
In this Chapter you will be able to:

   >>> Learn how to use the tkinter library.
   >>> Make your own Etch A Sketch game.
   >>> Learn how to put an application in its own window.
   >>> Learn how to attach functions to keyboard presses.



Here is a movie of this chapter's project: myEtchaSketch.py
Here is a movie of a two player version: ourEtchaSketch.py

Answers to Challenges

Click below to find the answers to the puzzles and challenges in Python Basics.

Answers

Contact: chris@codingclub.co.uk


Python Basics:


Python Programming Art:


Python: Next Steps:


Python: Interactive Adventures:


Python: Building Big Apps:


Black Flag:


Other Info:

Quick Index

© in the Site, Chris Roffey 2012
© in extracts from Python Basics, Cambridge University Press 2012
© in extracts from Python Next Steps, Cambridge University Press 2013
© in the characters derived from Python Basics. Cambridge University Press 2012
© in the characters derived from Python Next Steps. Cambridge University Press 2013
© in the characters derived from Python Building Big Apps. Cambridge University Press 2013
© in the characters derived from Python Programming Art. Cambridge University Press 2014
© in the characters derived from Python Interactive Adventures. Cambridge University Press 2016