0% found this document useful (0 votes)
77 views43 pages

Coding Club Level 2 Python Next Steps Roffey C. pdf download

The document is a guide for the 'Coding Club Level 2 Python Next Steps' book by Chris Roffey, aimed at teaching Python programming to children aged 12-13 and older beginners. It covers essential topics such as data types, building GUIs, and creating a simple calculator, providing practical projects and exercises. The book encourages hands-on coding and problem-solving to help readers develop good programming habits.

Uploaded by

lgnmnvrjs937
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views43 pages

Coding Club Level 2 Python Next Steps Roffey C. pdf download

The document is a guide for the 'Coding Club Level 2 Python Next Steps' book by Chris Roffey, aimed at teaching Python programming to children aged 12-13 and older beginners. It covers essential topics such as data types, building GUIs, and creating a simple calculator, providing practical projects and exercises. The book encourages hands-on coding and problem-solving to help readers develop good programming habits.

Uploaded by

lgnmnvrjs937
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 43

Coding Club Level 2 Python Next Steps Roffey C.

pdf download

https://ebookname.com/product/coding-club-level-2-python-next-
steps-roffey-c/

Get Instant Ebook Downloads – Browse at https://ebookname.com


Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

Next generation video coding and streaming 1st Edition


Bing

https://ebookname.com/product/next-generation-video-coding-and-
streaming-1st-edition-bing/

Leading Your Business to the Next Level Rodney Page

https://ebookname.com/product/leading-your-business-to-the-next-
level-rodney-page/

Embedded C Coding Standard Michael Barr

https://ebookname.com/product/embedded-c-coding-standard-michael-
barr/

Rockets and People Hot days of the cold war First


English Language Edition. Edition Boris Chertok

https://ebookname.com/product/rockets-and-people-hot-days-of-the-
cold-war-first-english-language-edition-edition-boris-chertok/
Smooth Homogeneous Structures in Operator Theory 1st
Edition Daniel Beltita

https://ebookname.com/product/smooth-homogeneous-structures-in-
operator-theory-1st-edition-daniel-beltita/

Geomancist SECOND EDITION A Fated Mates Paranormal


Series 7 Forbidden Arts A Paranormal Romance Series
Book 5 Charmaine Pauls

https://ebookname.com/product/geomancist-second-edition-a-fated-
mates-paranormal-series-7-forbidden-arts-a-paranormal-romance-
series-book-5-charmaine-pauls/

Pll Performance Simulation and Design 3rd Edition Dean


Banerjee

https://ebookname.com/product/pll-performance-simulation-and-
design-3rd-edition-dean-banerjee/

The Secrets of Getting Better Grades Study Smarter Not


Harder 2nd Edition Brian Marshall

https://ebookname.com/product/the-secrets-of-getting-better-
grades-study-smarter-not-harder-2nd-edition-brian-marshall/

Focus on Grammar 2 Workbook A2 4th Edition Samuela


Eckstut-Didier

https://ebookname.com/product/focus-on-grammar-2-workbook-a2-4th-
edition-samuela-eckstut-didier/
Java Web Services Up and Running Second Edition Martin
Kalin

https://ebookname.com/product/java-web-services-up-and-running-
second-edition-martin-kalin/
Cod
i
Clu ng
Python b

Next
Steps level 2
Chris Roffey
Cod
i
Clu ng
Python b

Next
Steps level 2
Chris Roffey
University Printing House, Cambridge CB2 8BS, United Kingdom

Cambridge University Press is part of the University of Cambridge.


It furthers the University’s mission by disseminating knowledge in the pursuit of
education, learning and research at the highest international levels of excellence.

www.cambridge.org
Information on this title: www.cambridge.org/9781107623255
© Cambridge University Press 2013
This publication is in copyright. Subject to statutory exception
and to the provisions of relevant collective licensing agreements,
no reproduction of any part may take place without the written
permission of Cambridge University Press.
First published 2013
Reprinted 2013
Printed in Poland by Opolgraf
A catalogue record for this publication is available from the British Library
ISBN 978-1-107-62325-5 Paperback
Cambridge University Press has no responsibility for the persistence or accuracy
of URLs for external or third-party internet websites referred to in this publication,
and does not guarantee that any content on such websites is, or will remain,
accurate or appropriate.
Contents
Introduction 4

Chapter 1: Data types 7

Chapter 2: Building GUIs 21

Chapter 3: Designing a simple calculator 36

Chapter 4: A fully working calculator 47

Chapter 5: Customising the calculator 61

Bonus chapter: Algorithms 74

Taking things further 90

Appendix 1: Some key bits of information 91

Appendix 2: Binary numbers 94

Appendix 3: Calculator functions source code 96

Glossary and index 99

The Quick Quiz answers 105

Acknowledgements 106
Contents 3
Introduction
Who is this book for?
This book is the Level 2 core book in the Coding Club series of books. To get the most out
of this title, you should be familiar with the Python 3 programming language and know
about variables, while loops and if, elif and else statements. Therefore, we advise that you
first read Python Basics before reading this book. Python: Next steps is aimed at 12–13 year
olds but is accessible to older children and even adults who want to learn about computer
programming.

Why should you choose this book?


This book explains important principles while helping you build useful short projects. We
want you, the reader, to learn not only how to make the programs in this book but also
how to design your own. We want you to be able to write programs well, so that if you take
it further and become the inventor of the next Google you will not have to unlearn bad
programming habits.

Introduction 4
What you need?
Any computer can run Python 3. If your computer does not already have Python 3 installed
there is a section on the companion website (www.codingclub.co.uk) that guides you through
the installation. This takes about five minutes! That is all you need to get started.

Start files for all the projects in the book are available to download from the companion
website so you do not get lost in the bigger projects. There are also finished files for each
project, should you get stuck, and answers to the puzzles and challenges.

How to use this book


You should read this book carefully and build all the main projects in order. At the end of
each chapter there are further ideas, and challenges that you can think of as ‘mini quests’.
Some readers will want to work through them all so that they understand everything all the
time. Some of you will probably prefer to rush through and get to the end. Which approach
is best? The one you are most comfortable with is the best approach for you. If you are being
guided by a teacher, you should trust their judgement so that you can get the most help out
of them as possible.

There are four ways in which this book tries to help you to learn:

1 Typing in the code – this is important as it gets you to work through the code a line at a
time (like computers do) and will help you remember the details in the future.
2 Finding and fixing errors – error messages in Python give you some clues as to what has
gone wrong. Solving these problems yourself will help you to be a better programmer.
However, if you get stuck, the code can be downloaded from the companion website
(www.codingclub.co.uk).
Introduction 5
3 Experimenting – feel free to experiment with the code you write. See what else you can
make it do. If you try all the challenges, puzzles and ideas, and generally play with the
code, this will help you learn how to write code like a professional.
4 Finally, this book will not only provide the code to build some pretty cool, short projects –
it will also teach you how the programs were designed. You can then use the same
methods to design your own applications.

A word of warning
You may be tempted to simply get the code off the website instead of typing it out yourself.
If you do this you will probably find that you cannot remember how to write code so easily
later. In this book you will only be asked to type small chunks of code at a time – remember
that this will help you understand every detail of each of your programs.

Introduction 6
Chapter 1
Data types
In this chapter you will:

• learn about data types

• learn about tuples, lists and dictionaries

• make a version of MyMagic8Ball that is much shorter than the one from Python Basics.

Data types
In Python Basics you learned about strings (bits of text), integers (whole numbers) and
I’m back!
floats (numbers with a decimal point). These are examples of data types. There are more!
In this chapter we will look at some new data types: tuples, lists and dictionaries. These new
data types are all called container data types because they store more than one piece of
data. For example, they can store several strings. They do so in different ways and have their
own advantages and disadvantages.

A string is rather like a container because it stores a whole sequence of letters or numbers (or
a mixture of both). In Python Basics we learned that there are several functions we can use on
strings. We can also use many of these functions on tuples, lists and dictionaries.
Chapter 1: Data types 7
Tuples
A tuple is the simplest of our new data types. They can store strings, integers and other data
types. Here is an example of a tuple that stores four strings, each separated by a comma:

my_tuple = ("one", "two", "three", "four")

Each value in a tuple is separated by a comma. Unlike variables, we cannot change what is
stored in a given tuple.

Each value in the tuple has an index starting from 0. So, print(my_tuple[1])for the
example above produces the output two. Look at how this works below.

Python 3.1.3 (r313:86834, Nov 28 2010, 10:01:07)


[GCC 4.4.5] on linux2
Type "copyright", "credits" or "license()" for more information.
==== No Subprocess ====
>>> my_tuple = ("one", "two", "three", "four")
>>> print(my_tuple[0])
one
>>> print(my_tuple[1])
two
>>> print(my_tuple[2])
three
>>> print(my_tuple[3])
four
>>>

A tuple.
Chapter 1: Data types 8
MyMagic8Ball
In Python Basics we wrote a small application called MyMagic8Ball that used the random
module and the functions print(), input() and randint(). Here is the code:

Code Box 1.1


# My Magic 8 Ball

import random

# write answers
ans1="Go for it!"
ans2="No way, Jose!"
ans3="I'm not sure. Ask me again."
ans4="Fear of the unknown is what imprisons us."
ans5="It would be madness to do that!"
ans6="Only you can save mankind!"
ans7="Makes no difference to me, do or don't - whatever."
ans8="Yes, I think on balance that is the right choice."

print("Welcome to MyMagic8Ball.")

# get the user's question


question = input("Ask me for advice then press ENTER to shake me.\n")

(continues on the next page)

Chapter 1: Data types 9


print("shaking ...\n" * 4)

# use the randint() function to select the correct answer


choice=random.randint(1, 8)
if choice==1:
answer=ans1
elif choice==2:
answer=ans2
elif choice==3:
answer=ans3
elif choice==4:
answer=ans4
elif choice==5:
answer=ans5
elif choice==6:
answer=ans6
elif choice==7:
answer=ans7
else:
answer=ans8

# print the answer to the screen


print(answer)

input("\n\nPress the RETURN key to finish.")

Chapter 1: Data types 10


Now see how much easier and shorter the code is if we include a tuple:

Code Box 1.2


# My Magic 8 Ball

import random

# put answers in a tuple

answers = (
"Go for it!",
"No way, Jose!",
"I'm not sure. Ask me again.",
"Fear of the unknown is what imprisons us.",
"It would be madness to do that!",
"Only you can save mankind!",
"Makes no difference to me, do or don't - whatever.",
"Yes, I think on balance that is the right choice."
)

print("Welcome to MyMagic8Ball.")

# get the user's question


question = input("Ask me for advice then press ENTER to shake me.\n")

print("shaking ...\n" * 4)

# use the randint() function to select the correct answer


choice = random.randint(0, 7)

(continues on the next page)

Chapter 1: Data types 11


# print the answer to the screen
print(answers[choice])

# exit nicely
input("\n\nPress the RETURN key to finish.")

Analysis of Code Box 1.2


If it has been a while since you read Python Basics, you might find it useful to type this code
into IDLE and think about it line by line. Here is what it does.

The import statement

We are going to use a function from Python’s random module so we need to import it.

The tuple

We have to separate the strings in the tuple answers with commas. Starting a new line after
each comma makes the code much easier to read.

The input() function

The input() function listens to the keyboard entry and waits for the return key to be
pressed. It then returns the keyboard input as a string, which we store in the variable
question.

Chapter 1: Data types 12


question = input("Ask me for advice then press ENTER to shake me.\n") Are you are a bit confused
about when to use round brackets
and when to use square brackets?
variable name to access string that is printed out, Basically, when we create a tuple we
the keyboard input giving instructions to the user wrap its contents in round brackets.
Whenever we call an indexed value
from the tuple, we put the index
The randint() function (its position in the list) in square
brackets.
choice = random.randint(0, 7)

This line of code asks the randint() method in the random module to select a random
number from 0 to 7. This number is then stored in the variable called choice. (A method is
a function in a class.)

Finishing off

print(answers[choice])

This uses the random number choice as the index in the answers tuple. This line selects
the string that was randomly chosen from the tuple and prints it.

Experiment
The two scripts are available from the companion website
(www.codingclub.co.uk). Try them both out and check that they
do the same thing.

Chapter 1: Data types 13


Lists Hmm, the list is surrounded by
square brackets this time.
A list is another type of container. They are very similar to tuples except that they can be
altered. Think of tuples as quick, memory-efficient lists that cannot be altered by other code.
We cannot insert or delete items in tuples with our programs. There are, however, functions
to allow us to insert or delete items in lists. Lists are written like this:

my_list = ["one", "two", "three", "four"]

Just as with tuples, each value in the list has an index starting from 0 and each value is
separated by a comma.

Look at how this works in interactive mode:

>>> my_list = ["one", "two", "three", "four"]


Do you remember that interactive mode
>>> my_list[2] in Python means using the Python shell rather
'three' than saving and running a file? It is very
>>> my_tuple = ("one", "two", "three", "four") useful for running little experiments.
>>> my_tuple[2]
'three'
>>>

You can see that both a list and a tuple provide the same output. So, when would we use a
list instead of a tuple? We would choose a list rather than a tuple if we want our program to
add, remove or change an item within the list.

Chapter 1: Data types 14


Quick Quiz 1.1
For each of the following say which is the best choice, a list or a tuple:
1 A place to store seven strings consisting of the days of the week (e.g. "Monday") that we
want to use in an application.
2 A place to store the full names of members of the Coding Club in an application we use to
keep track of who is still a club member.
3 A place to store the ten integer values (0, 1, 2, 3, 4, 5, 6, 7, 8 and 9) of the keys used to
make a calculator app.

Silly me, I was confused


for a moment here as I
Dictionaries had forgotten that strings
always appear in speech
The last of our container data types is a dictionary. Dictionaries take a slightly marks and numbers do
different form. In dictionaries we supply our own indexes. Here, we call the index a key. not. So 1 is an integer but
"1" is a number stored
Keys can be strings, integers, floats or even tuples. Here is an example:
as a string!
key value

my_dictionary = {1:"cat", 2:"dog", 3:"horse", 4:"fish"}

or
key value

my_dictionary = {"1":"cat", "2":"dog", "3":"horse", "4":"fish"}

Chapter 1: Data types 15


Look at how this works in interactive mode:

>>> my_dictionary = {1:"one", 2:"two", 3:"three", 4:"four"}


>>> my_dictionary[2]
'two'
>>> my_dictionary = {"1":"one", "2":"two", "3":"three", "4":"four"}
>>> my_dictionary["2"]
'two'

You might have noticed that dictionaries require a different structure within the brackets to
assign keys to the values. They use a colon ‘:’ to separate the value from its key.

What’s with the brackets?


When we create a new container, Python provides us with a quick way of defining which
kind we require by our choice of brackets.

• If you want a tuple – wrap it in round brackets.

• If you want a list – use square brackets.

• If it’s a dictionary you are after – use curly brackets.

Chapter 1: Data types 16


Delving Deeper
What’s the difference?
Strings, tuples and lists are all indexed ordered containers; the values are automatically given an index
based on the order in which they were input. Dictionaries have keys that you provide and the key–value
pairs are not stored in a particular order. Strings and tuples have their content set at creation and cannot be
changed by a program directly. Lists and dictionaries are containers in which the values can be added to and
changed in a variety of ways.
It is also possible to create empty containers like this:
my_string = ""
my_tuple = ()
my_list = []
my_dictionary = {}

Useful functions
Table 1.1 provides a list of useful functions you can use on strings, tuples, lists and
dictionaries. You can also find it in Appendix 1. The table assumes the following containers
have been created:

>>> s = "bar" # a string


>>> t = ("b", "a", "r") # a tuple
>>> l = ["b", "a", "r"] # a list
>>> d = {1:"b", 2:"a", 3:"r"} # a dictionary

Chapter 1: Data types 17


Function Strings Tuples Lists Dictionaries
print all >>> print(s) >>> print(t) >>> print(l) >>> print(d)
bar ('b', 'a', 'r') ['b', 'a', 'r'] {1: 'b', 2: 'a', 3: 'r'}
print >>> print(s[2]) >>> print(t[2]) >>> print(l[2]) >>> print(d[2])
element r r r a
combine >>> a=s+"f" >>> a=t+("f",) >>> a=l+["f"]
>>> a >>> a >>> a
'barf' ('b', 'a', 'r', 'f') ['b', 'a', 'r', 'f']
add an Strings cannot Tuples cannot be >>> l.append("f") >>> d[4]="f"
element be altered. altered. >>> l >>> d[4]
['b', 'a', 'r', 'f'] 'f'
sort Strings cannot Tuples cannot be >>> l.sort() >>> sorted(d)
be altered. altered. >>> l ['1', '2', '3']
['a', 'b', 'r'] >>> sorted(d.values()) This table could be very
['a', 'b', 'r'] helpful when I write
delete an Strings cannot Tuples cannot be >>> del l[1] >>> del d[1] my own applications!
element be altered. altered. >>> l >>> i
['b', 'r'] {2:'a', 3:'r'}
replace Strings cannot Tuples cannot be >>> l[0]="c" >>> d[1]="c"
element be altered. altered. >>> l >>> print(d)
['c', 'a', 'r'] {1: 'c', 2: 'a', 3: 'r'}
find >>> i.find("b") >>> t.index("b") >>> l.index("b")
0 0 0
get >>> len(s) >>> len(t) >>> len(l) >>> len(d)
length 3 3 3 3

Table 1.1 Some useful functions.


s = "bar" # a string
t = ("b", "a", "r") # a tuple
l = ["b", "a", "r"] # a list
d = {1:"b", 2:"a", 3:"r"} # a dictionary
Chapter 1: Data types 18
Quick Quiz 1.2
For each of the following say whether to choose a tuple, a list, or a dictionary:
1 A container to store the personal best times achieved by club swimmers in the 100m
freestyle such as: Mark: 65.34s, Freya: 68.04s, etc.
2 A container to store the months of the year.
3 A container to store the monthly rainfall data for London in 2012.
4 A container to store the names of the students who currently attend the chess club.

Chapter summary
In this chapter you have:

• learned more about data types


• learned about tuples, lists and dictionaries
• made a shorter version of MyMagic8Ball
• seen some of the different functions that can and cannot be used with the new It is always good
data types. to practise.

We will explore these new data types further in this book. Here are just a few ideas
that will help you refresh your coding skills from Python Basics. (As dictionaries are the
hardest to use, we will wait until you have learned a little bit more before providing any
puzzles involving them.)

Chapter 1: Data types 19


Puzzle
Write a new version of MyMagic8Ball using a list instead of a tuple. It should work in exactly
the same way if you get it right because lists can do everything tuples can and more.

Challenge
This is a challenge from Python Basics so although you may be a bit rusty you should be
able to manage it. Hopefully it brings back happy memories for you.
1 Add some code to myMagic8Ball2.py (Code Box 1.2) so that the Magic8Ball says “Hi”
and asks for the user’s name at the start of the game.
2 It should then store the input in a variable such as user_name.
3 Change the code so that the Magic8Ball talks to the user using their name. At the end
for example, it could say: “Thanks for playing, [Name]. Please press the RETURN key to
finish.”
You are destined to
There are several ways to do this. become a famous computer
To see one answer go to www.codingclub.co.uk/book2_resources.php. scientist one day!

Idea
Change the Magic8Ball game into a fortune cookie game. You could call it
myFortuneCookie.py.

Chapter 1: Data types 20


Chapter 2
Building GUIs
In this chapter you will:

• practise using tuples and dictionaries

• revise how to use tkinter and learn about using widgets

• build a graphical user interface (GUI)

• build a glossary application.

Chapter 2: Building GUIs 21


MyGlossary
A graphical user interface (GUI) is, very simply, the ‘screen’ that allows a user to interact
with their computer through graphics such as menus and buttons. You are now going to
build a small GUI application of your own using tkinter.

In the source code downloaded from the companion website, in the folder for Chapter 2,
you will find a file called myGlossary_Start.py. This file provides you with outline source
code for a glossary application containing the complete glossary for this book. This is also
provided for reference in Code Box 2.1.

Code Box 2.1


# myGlossary_Start.py

from tkinter import *

# key press function:

##### main:
window = Tk()
window.title("My Coding Club Glossary")

# create label

# create text entry box

# Add a submit button:

Chapter 2: Building GUIs 22


# create another label It is useful to be able to
choose whether to wrap
strings in single or double
# create text box speech marks. Don’t
forget to be consistent in
# The dictionary: your code though.
my_glossary = {
'algorithm': 'Step by step instructions to perform a task that a
computer could understand.',
'bug': 'A piece of code that is causing a program to fail to run
properly or at all.',
'binary number': 'A number represented in base 2.'
}

##### Run mainloop


window.mainloop()

The glossary has been stored as a dictionary data type. The key is the glossary word and the
value is the definition.

e.g. 'function': 'A reusable piece of code'

key value

We have used single speech marks rather than the usual double ones so that we can use
double speech marks in the definitions without having to escape them all.

Chapter 2: Building GUIs 23


Another Random Document on
Scribd Without Any Related Topics
*** END OF THE PROJECT GUTENBERG EBOOK NOTES AND
QUERIES, NUMBER 177, MARCH 19, 1853 ***

Updated editions will replace the previous one—the old editions


will be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States
copyright in these works, so the Foundation (and you!) can copy
and distribute it in the United States without permission and
without paying copyright royalties. Special rules, set forth in the
General Terms of Use part of this license, apply to copying and
distributing Project Gutenberg™ electronic works to protect the
PROJECT GUTENBERG™ concept and trademark. Project
Gutenberg is a registered trademark, and may not be used if
you charge for an eBook, except by following the terms of the
trademark license, including paying royalties for use of the
Project Gutenberg trademark. If you do not charge anything for
copies of this eBook, complying with the trademark license is
very easy. You may use this eBook for nearly any purpose such
as creation of derivative works, reports, performances and
research. Project Gutenberg eBooks may be modified and
printed and given away—you may do practically ANYTHING in
the United States with eBooks not protected by U.S. copyright
law. Redistribution is subject to the trademark license, especially
commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the


free distribution of electronic works, by using or distributing this
work (or any other work associated in any way with the phrase
“Project Gutenberg”), you agree to comply with all the terms of
the Full Project Gutenberg™ License available with this file or
online at www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand,
agree to and accept all the terms of this license and intellectual
property (trademark/copyright) agreement. If you do not agree
to abide by all the terms of this agreement, you must cease
using and return or destroy all copies of Project Gutenberg™
electronic works in your possession. If you paid a fee for
obtaining a copy of or access to a Project Gutenberg™
electronic work and you do not agree to be bound by the terms
of this agreement, you may obtain a refund from the person or
entity to whom you paid the fee as set forth in paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only


be used on or associated in any way with an electronic work by
people who agree to be bound by the terms of this agreement.
There are a few things that you can do with most Project
Gutenberg™ electronic works even without complying with the
full terms of this agreement. See paragraph 1.C below. There
are a lot of things you can do with Project Gutenberg™
electronic works if you follow the terms of this agreement and
help preserve free future access to Project Gutenberg™
electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright
law in the United States and you are located in the United
States, we do not claim a right to prevent you from copying,
distributing, performing, displaying or creating derivative works
based on the work as long as all references to Project
Gutenberg are removed. Of course, we hope that you will
support the Project Gutenberg™ mission of promoting free
access to electronic works by freely sharing Project Gutenberg™
works in compliance with the terms of this agreement for
keeping the Project Gutenberg™ name associated with the
work. You can easily comply with the terms of this agreement
by keeping this work in the same format with its attached full
Project Gutenberg™ License when you share it without charge
with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.

1.E. Unless you have removed all references to Project


Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project
Gutenberg™ work (any work on which the phrase “Project
Gutenberg” appears, or with which the phrase “Project
Gutenberg” is associated) is accessed, displayed, performed,
viewed, copied or distributed:

This eBook is for the use of anyone anywhere in the United


States and most other parts of the world at no cost and
with almost no restrictions whatsoever. You may copy it,
give it away or re-use it under the terms of the Project
Gutenberg License included with this eBook or online at
www.gutenberg.org. If you are not located in the United
States, you will have to check the laws of the country
where you are located before using this eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is


derived from texts not protected by U.S. copyright law (does not
contain a notice indicating that it is posted with permission of
the copyright holder), the work can be copied and distributed to
anyone in the United States without paying any fees or charges.
If you are redistributing or providing access to a work with the
phrase “Project Gutenberg” associated with or appearing on the
work, you must comply either with the requirements of
paragraphs 1.E.1 through 1.E.7 or obtain permission for the use
of the work and the Project Gutenberg™ trademark as set forth
in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is


posted with the permission of the copyright holder, your use and
distribution must comply with both paragraphs 1.E.1 through
1.E.7 and any additional terms imposed by the copyright holder.
Additional terms will be linked to the Project Gutenberg™
License for all works posted with the permission of the copyright
holder found at the beginning of this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files
containing a part of this work or any other work associated with
Project Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute


this electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1
with active links or immediate access to the full terms of the
Project Gutenberg™ License.

1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must,
at no additional cost, fee or expense to the user, provide a copy,
a means of exporting a copy, or a means of obtaining a copy
upon request, of the work in its original “Plain Vanilla ASCII” or
other form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™
works unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or


providing access to or distributing Project Gutenberg™
electronic works provided that:

• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”

• You provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of receipt
that s/he does not agree to the terms of the full Project
Gutenberg™ License. You must require such a user to return or
destroy all copies of the works possessed in a physical medium
and discontinue all use of and all access to other copies of
Project Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund of


any money paid for a work or a replacement copy, if a defect in
the electronic work is discovered and reported to you within 90
days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project


Gutenberg™ electronic work or group of works on different
terms than are set forth in this agreement, you must obtain
permission in writing from the Project Gutenberg Literary
Archive Foundation, the manager of the Project Gutenberg™
trademark. Contact the Foundation as set forth in Section 3
below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on,
transcribe and proofread works not protected by U.S. copyright
law in creating the Project Gutenberg™ collection. Despite these
efforts, Project Gutenberg™ electronic works, and the medium
on which they may be stored, may contain “Defects,” such as,
but not limited to, incomplete, inaccurate or corrupt data,
transcription errors, a copyright or other intellectual property
infringement, a defective or damaged disk or other medium, a
computer virus, or computer codes that damage or cannot be
read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except


for the “Right of Replacement or Refund” described in
paragraph 1.F.3, the Project Gutenberg Literary Archive
Foundation, the owner of the Project Gutenberg™ trademark,
and any other party distributing a Project Gutenberg™ electronic
work under this agreement, disclaim all liability to you for
damages, costs and expenses, including legal fees. YOU AGREE
THAT YOU HAVE NO REMEDIES FOR NEGLIGENCE, STRICT
LIABILITY, BREACH OF WARRANTY OR BREACH OF CONTRACT
EXCEPT THOSE PROVIDED IN PARAGRAPH 1.F.3. YOU AGREE
THAT THE FOUNDATION, THE TRADEMARK OWNER, AND ANY
DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE LIABLE
TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL,
PUNITIVE OR INCIDENTAL DAMAGES EVEN IF YOU GIVE
NOTICE OF THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you


discover a defect in this electronic work within 90 days of
receiving it, you can receive a refund of the money (if any) you
paid for it by sending a written explanation to the person you
received the work from. If you received the work on a physical
medium, you must return the medium with your written
explanation. The person or entity that provided you with the
defective work may elect to provide a replacement copy in lieu
of a refund. If you received the work electronically, the person
or entity providing it to you may choose to give you a second
opportunity to receive the work electronically in lieu of a refund.
If the second copy is also defective, you may demand a refund
in writing without further opportunities to fix the problem.

1.F.4. Except for the limited right of replacement or refund set


forth in paragraph 1.F.3, this work is provided to you ‘AS-IS’,
WITH NO OTHER WARRANTIES OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.

1.F.5. Some states do not allow disclaimers of certain implied


warranties or the exclusion or limitation of certain types of
damages. If any disclaimer or limitation set forth in this
agreement violates the law of the state applicable to this
agreement, the agreement shall be interpreted to make the
maximum disclaimer or limitation permitted by the applicable
state law. The invalidity or unenforceability of any provision of
this agreement shall not void the remaining provisions.

1.F.6. INDEMNITY - You agree to indemnify and hold the


Foundation, the trademark owner, any agent or employee of the
Foundation, anyone providing copies of Project Gutenberg™
electronic works in accordance with this agreement, and any
volunteers associated with the production, promotion and
distribution of Project Gutenberg™ electronic works, harmless
from all liability, costs and expenses, including legal fees, that
arise directly or indirectly from any of the following which you
do or cause to occur: (a) distribution of this or any Project
Gutenberg™ work, (b) alteration, modification, or additions or
deletions to any Project Gutenberg™ work, and (c) any Defect
you cause.

Section 2. Information about the Mission


of Project Gutenberg™
Project Gutenberg™ is synonymous with the free distribution of
electronic works in formats readable by the widest variety of
computers including obsolete, old, middle-aged and new
computers. It exists because of the efforts of hundreds of
volunteers and donations from people in all walks of life.

Volunteers and financial support to provide volunteers with the


assistance they need are critical to reaching Project
Gutenberg™’s goals and ensuring that the Project Gutenberg™
collection will remain freely available for generations to come. In
2001, the Project Gutenberg Literary Archive Foundation was
created to provide a secure and permanent future for Project
Gutenberg™ and future generations. To learn more about the
Project Gutenberg Literary Archive Foundation and how your
efforts and donations can help, see Sections 3 and 4 and the
Foundation information page at www.gutenberg.org.

Section 3. Information about the Project


Gutenberg Literary Archive Foundation
The Project Gutenberg Literary Archive Foundation is a non-
profit 501(c)(3) educational corporation organized under the
laws of the state of Mississippi and granted tax exempt status
by the Internal Revenue Service. The Foundation’s EIN or
federal tax identification number is 64-6221541. Contributions
to the Project Gutenberg Literary Archive Foundation are tax
deductible to the full extent permitted by U.S. federal laws and
your state’s laws.

The Foundation’s business office is located at 809 North 1500


West, Salt Lake City, UT 84116, (801) 596-1887. Email contact
links and up to date contact information can be found at the
Foundation’s website and official page at
www.gutenberg.org/contact
Section 4. Information about Donations to
the Project Gutenberg Literary Archive
Foundation
Project Gutenberg™ depends upon and cannot survive without
widespread public support and donations to carry out its mission
of increasing the number of public domain and licensed works
that can be freely distributed in machine-readable form
accessible by the widest array of equipment including outdated
equipment. Many small donations ($1 to $5,000) are particularly
important to maintaining tax exempt status with the IRS.

The Foundation is committed to complying with the laws


regulating charities and charitable donations in all 50 states of
the United States. Compliance requirements are not uniform
and it takes a considerable effort, much paperwork and many
fees to meet and keep up with these requirements. We do not
solicit donations in locations where we have not received written
confirmation of compliance. To SEND DONATIONS or determine
the status of compliance for any particular state visit
www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states


where we have not met the solicitation requirements, we know
of no prohibition against accepting unsolicited donations from
donors in such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot


make any statements concerning tax treatment of donations
received from outside the United States. U.S. laws alone swamp
our small staff.

Please check the Project Gutenberg web pages for current


donation methods and addresses. Donations are accepted in a
number of other ways including checks, online payments and
credit card donations. To donate, please visit:
www.gutenberg.org/donate.

Section 5. General Information About


Project Gutenberg™ electronic works
Professor Michael S. Hart was the originator of the Project
Gutenberg™ concept of a library of electronic works that could
be freely shared with anyone. For forty years, he produced and
distributed Project Gutenberg™ eBooks with only a loose
network of volunteer support.

Project Gutenberg™ eBooks are often created from several


printed editions, all of which are confirmed as not protected by
copyright in the U.S. unless a copyright notice is included. Thus,
we do not necessarily keep eBooks in compliance with any
particular paper edition.

Most people start at our website which has the main PG search
facility: www.gutenberg.org.

This website includes information about Project Gutenberg™,


including how to make donations to the Project Gutenberg
Literary Archive Foundation, how to help produce our new
eBooks, and how to subscribe to our email newsletter to hear
about new eBooks.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookname.com

You might also like