We use cookies to distinguish you from other users and to provide you with a better experience on our websites. Close this message to accept cookies or find out how to manage your cookie settings.
To save content items to your account,
please confirm that you agree to abide by our usage policies.
If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account.
Find out more about saving content to .
To save content items to your Kindle, first ensure [email protected]
is added to your Approved Personal Document E-mail List under your Personal Document Settings
on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part
of your Kindle email address below.
Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations.
‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi.
‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
In this final, most complicated challenge the reader needs to create a complete program that could be used by an art gallery to store a list of the art and artists in their collection. This should be stored in a relational SQL database which can be accessed by a graphical user interface.
This chapter introduces readers to another type of iteration and shows them how to create conditional controlled loops (using while loops). The seven challenges include nested code utilising and building on the skills they have learnt in previous chapters.
Comma Separated Value (.csv) files allow data to be stored in rows and columns that can be read by a spreadsheet. This gives the data more structure making it easier to identify. The reader completes seven challenges, including reading and writing .csv files, and removing data from a .csv file.
This chapter improves on the skills learnt in the previous chapter. The reader discovers how to use icons, images and drop-down lists to make more complex graphical user interfaces they can use to complete the six challenges.
In this challenge the reader must create a graphical user interface, which will display the times tables and will need to use the following skills: loops (while and for), subprograms and the Tkinter library.
Where variables only allow a single value to be stored, tuples, lists and dictionaries allow multiple values to be stored under a single name. The reader is shown how to create lists, insert data, delete values and sort the data which they use to complete the eleven challenges.
Iteration allows code to be repeated and this chapter shows the reader how to create count-controlled loops (using for loops) that implement the range expression. They complete ten challenges ensuring they are familiar with using iteration in their coding.
In this chapter the reader creates if statements, which include elif and else statements, and learns about nesting statements together. They become familiar with conditional operators such as greater than, less than and equal to along with comparison operators such as and, or and not as they build upon the knowledge they have acquired in the first chapter to program solutions for the eight given challenges.
The reader will use more advanced string manipulation and learn how to use index numbers to identify individual characters. Completing the eight challenges readers recap and embed the skills they have learnt from previous chapters.
For this challenge, the reader needs to create a program that will store the user ID and passwords for the users of a system in a .csv file. The skills they need include: input and display data, lists, if statements, loops (while and for), subprograms and saving to and reading from a .csv file.
This is the first of the five chunky challenges that are created to allow the reader to practice all the skills they have learnt in a larger program that will take longer to complete. In this challenge the reader must create a program that will encode or decode a message using a shift code. The skills they will need include: input and display data, lists, splitting and joining strings, if statements, loops (while and for) and subprograms.
Generating random integers and selecting random values from a list shows readers how to create simple games and a basic maths quiz. The eight challenges help them experiment with the Python language and create workable solutions to improve their programming skills.