100% found this document useful (1 vote)
42 views34 pages

Complete Python For Teenagers: Learn To Program Like A Superhero! 2nd Edition Payne PDF For All Chapters

Python

Uploaded by

miisseenwelu
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
100% found this document useful (1 vote)
42 views34 pages

Complete Python For Teenagers: Learn To Program Like A Superhero! 2nd Edition Payne PDF For All Chapters

Python

Uploaded by

miisseenwelu
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/ 34

Download the full version of the ebook at

https://ebookmass.com

Python for Teenagers: Learn to Program like a


Superhero! 2nd Edition Payne

https://ebookmass.com/product/python-for-
teenagers-learn-to-program-like-a-superhero-2nd-
edition-payne/

Explore and download more ebook at https://ebookmass.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Python for Teenagers: Learn to Program like a Superhero!,


2nd Edition James R. Payne

https://ebookmass.com/product/python-for-teenagers-learn-to-program-
like-a-superhero-2nd-edition-james-r-payne/

testbankdeal.com

Python for Finance: A Crash Course Modern Guide: Learn


Python Fast Bisette

https://ebookmass.com/product/python-for-finance-a-crash-course-
modern-guide-learn-python-fast-bisette/

testbankdeal.com

Beginning Photo Retouching and Restoration Using GIMP:


Learn to Retouch and Restore Your Photos like a Pro, 2nd
edition Phillip Whitt
https://ebookmass.com/product/beginning-photo-retouching-and-
restoration-using-gimp-learn-to-retouch-and-restore-your-photos-like-
a-pro-2nd-edition-phillip-whitt/
testbankdeal.com

A Beginners Guide to Python 3 Programming 2nd Edition John


Hunt

https://ebookmass.com/product/a-beginners-guide-to-
python-3-programming-2nd-edition-john-hunt/

testbankdeal.com
Pro Bash: Learn to Script and Program the GNU/Linux Shell
3rd Edition Jayant Varma

https://ebookmass.com/product/pro-bash-learn-to-script-and-program-
the-gnu-linux-shell-3rd-edition-jayant-varma/

testbankdeal.com

Reading Like a Lawyer: Time Saving Strategies for Reading


Law Like an Expert, Second Edition 2nd Edition, (Ebook
PDF)
https://ebookmass.com/product/reading-like-a-lawyer-time-saving-
strategies-for-reading-law-like-an-expert-second-edition-2nd-edition-
ebook-pdf/
testbankdeal.com

Python Programming: 3 Books in 1: Ultimate Beginneru2019s,


Intermediate & Advanced Guide to Learn Python Step-by-Step

https://ebookmass.com/product/python-programming-3-books-
in-1-ultimate-beginners-intermediate-advanced-guide-to-learn-python-
step-by-step/
testbankdeal.com

Quick Start Guide to FFmpeg: Learn to Use the Open Source


Multimedia-Processing Tool like a Pro 1st Edition V.
Subhash
https://ebookmass.com/product/quick-start-guide-to-ffmpeg-learn-to-
use-the-open-source-multimedia-processing-tool-like-a-pro-1st-edition-
v-subhash/
testbankdeal.com

Quick Start Guide to FFmpeg: Learn to Use the Open Source


Multimedia-Processing Tool like a Pro 1st Edition V.
Subhash
https://ebookmass.com/product/quick-start-guide-to-ffmpeg-learn-to-
use-the-open-source-multimedia-processing-tool-like-a-pro-1st-edition-
v-subhash-2/
testbankdeal.com
James R. Payne

Python for Teenagers


Learn to Program like a Superhero!
2nd ed.
James R. Payne
Gainesville, GA, USA

ISBN 978-1-4842-9987-6 e-ISBN 978-1-4842-9988-3


https://doi.org/10.1007/978-1-4842-9988-3

© James R. Payne 2019, 2024

Standard Apress

The use of general descriptive names, registered names, trademarks,


service marks, etc. in this publication does not imply, even in the
absence of a specific statement, that such names are exempt from the
relevant protective laws and regulations and therefore free for general
use.

The publisher, the authors, and the editors are safe to assume that the
advice and information in this book are believed to be true and accurate
at the date of publication. Neither the publisher nor the authors or the
editors give a warranty, expressed or implied, with respect to the
material contained herein or for any errors or omissions that may have
been made. The publisher remains neutral with regard to jurisdictional
claims in published maps and institutional affiliations.

This Apress imprint is published by the registered company APress


Media, LLC, part of Springer Nature.
The registered company address is: 1 New York Plaza, New York, NY
10004, U.S.A.
To my wife Whitney Payne, for always believing and pretending not to
notice when I yell at the computer.
To my parents, Ronnie and Sharon Payne, and my brother, also Ronnie
Payne, who all mysteriously have “ron” in their name and who always told
me I could become whatever I wanted in life, even when I told them I
wanted to be Batman.
To Dorjan Williams, who, years ago, helped me create a universe of
ridiculous comic book characters. To Eric Miller, who helps me solve
problems big and small, including slaying a dragon in my backyard, so
that I can focus – sometimes – on getting work done. Nicholas Rini
introduced me to both programming and comic books, and without him,
this book would not exist. Nanci Packard and Wendy White provided
inspiration with their use of words so big they couldn’t possibly fit in a
book. Thanks to members of the old Dev Shed crew: Jennifer Ruggieri –
who got me the job that got me the book (more than once) – Charles
Fagundes, and Keith Lee, for coding help and reminding me (frequently)
that my cup overfloweth. Jose Escalante, I thank you here because you
were the only one that could see John Cena. Enrique Stone… you know
what you did.
Jacquelyn Jurian, for reminding me to write by making me remind you to
write.
A special thanks to Sophie “the Bulldog” Payne for letting me use her
likeness in this book and always being such a good helper in the kitchen.
You will always be missed.
I would be remiss if I failed to thank the mad titan, Thanos, who helped
me accomplish so much with just a snap of his fingers. Mister T pitied this
fool, while Richard C. helped me “hit ’em with the Hein!” And lastly, thank
you to a handful of the writers that inspire me: A. Lee Martinez, Neil
Gaiman, Frank Miller, Alan Moore, Jim Starlin, and Stephen King – can’t
you guys write any faster?
Introduction
Who This Book Is For
This book is intended for teenagers looking to program in Python.
While that technically means anyone aged 13 through 18, the truth of
the matter is anyone of any age can (and should, if I do say so myself!)
pick up this book if they want to learn either (a) how to program in
Python, (b) how to program as a beginner, or (c) add Python to their
current skill set.
Above all, if you are holding this book in your hand, intrepid
adventurer, then this book is for you. The future is dependent on young
heroes like yourself, eager to learn the art of coding and go out into the
world and safeguard it from nefarious hackers, dubiously programmed
applications, and the rise of artificially intelligent robots!
So, whether you are in sixth grade or in college, this book will grant
you with superpowers galore. Sure, you won’t be able to see through
walls or lift cars over your head once you finish this book. However, you
will be able to speak the language of computers and create some pretty
cool programs.
And what could be better than that?

What You Will Learn in This Book


Chapter 1 provides an overview of programming and Python and then
shows you how to install Python and a Python IDLE, which will allow
you to create your own Python programs and test your code.
In Chapter 2, we will discuss mathematical functions (things like
division, addition, and multiplication) and learn about the different
data types used by Python. We will also begin to build the foundation of
a fun superhero generator app – “Superhero Generator 3000”!
Chapter 3 delves into how to work with text – also known as strings.
We take a look at the different types of storage Python offers as well.
We wrap things up by looking at common string functions and build
another section of our Superhero Generator 3000 application.
Sometimes a program will need to take a certain action depending
upon feedback from a user or from other influences. This is known as
decision-making and is the topic of Chapter 4.
Programming logic and loops – known as iterations, where code can
“loop” or repeat itself based on certain conditions – are covered in
Chapter 5.
Chapter 6 is a refresher course of what you have learned up until
this point. We will use all the knowledge we’ve acquired to finish
building the first complete version of Superhero Generator 3000. By the
end, you will be able to randomly create heroes with unique
superpowers, names, and battle statistics!
In Chapter 7, we begin to learn more advanced techniques. To be a
real coder, you must learn efficiency and reduce mistakes in your code.
That is where modules and built-in functions come into play. Learn what
they are and why they will make your life a whole lot easier in this
exciting chapter!
Chapter 8 looks at even more advanced topics: specifically, we will
cover the basics of object-oriented programming (OOP) and cover
objects and classes and define a thing called polymorphism.
To switch things up a little bit, Chapter 9 will look at some different
types of data structures, including tuples and dictionaries.
Chapter 10 brings us up to speed on how to create – and work with
– files inside of directories.
One of my personal favorite chapters is Chapter 11, which covers a
topic that is near and dear to my heart: Python for Gaming. We will
stroll through the world of video games and learn how to work with
video game elements, including sound, animation, and more!
Learning how to create games that interact with a user’s actions and
making images move within a game are truly what make games
enjoyable. Chapter 12 continues the topic of gaming and focuses
specifically on game animation.
In Chapter 13 – don’t worry, in this case 13 is lucky, for you at least!
– we move into areas of Python we have not yet discussed that do not fit
in their own chapter. This includes how to debug – or find broken code.
We also look at advanced modules and other topics.
Finally, we sum everything up in Chapter 14 and cover a wide range
of topics, including how to find work as a Python programmer, common
interview questions, the future of Python, and career paths, and answer
some of the frequently asked questions (FAQs) about our favorite
programming language.
So now that we know what we will learn, let’s put on our cape and
superhero outfits and get ready to leap tall buildings – of knowledge.
Why I Started Programming
I started programming a long, long time ago – back before the Internet
or cell phones existed and when wild dinosaurs roamed the earth. Back
then, computers didn’t have images on them like they do today.
Everything was text-based – even most of our games – the horror!
While we did have some computer games with animation and graphics,
they were 8-bit and not cinematic like the ones of today.
I was fortunate enough to share a computer with my older brother.
I’m pretty certain my parents didn’t know what a computer was used
for, but must have thought: “This future-device will surely make my
children Men… of… the… Future… future… future… future…” (just
pretend the word is echoing).
And to some degree, they were correct: if they hadn’t purchased my
brother and me a computer, who knows what I would be doing with my
life right now? Certainly not writing this book and helping you to
program like a hero!
But having a giant paperweight made of jumbled electronics – back
then we called it an Apple IIe – wasn’t enough to entice me to use it all
that much. After all, I happened to own a Nintendo Entertainment
System (NES) as well, and it had an amazing slew of games that I still –
embarrassingly – play to this day.
What really got me into computers was this: I had a friend, Nicholas
Rini, who knew all about programming computers. He showed me one
day how to “hack” into the code of a few of our favorite text-based
games to give ourselves an advantage. It was akin to creating your very
own cheat code in a video game. In particular, we played a game called
Lemonade Stand, which was exactly the same as standing outside your
house and selling homemade Lemonade, only you never made real
money and you didn’t get a sunburn.
In the game, you started out with a couple of dollars – barely
enough to make any real profit. However, once we looked at the code
running the game, we figured out that we could start out with however
much money we wanted if we just changed a few words around. Soon
enough, I was the world’s first millionaire Lemonade Stand mogul.
I was hooked.
From there, it was not a far stretch to conceive that we could
actually create our own video games, and that is exactly what we did.
From complex role-playing games (RPG) based off of our favorite comic
books and Dungeons & Dragons to programs that would ask our friends
a series of questions and then make fun of them based off of their
answers – shenanigans!
While all of that seemed silly at the time, looking back on it I now
know that it helped set the foundation for my love of programming and,
to a degree, writing (though I began writing much earlier than that).
Without that summer of programming fun, I would never have had the
wonderful experiences, friends, jobs, and writing opportunities that
have come my way ever since.
And, mostly, I would never have had the fun of programming either.
That is what I am hoping to pass on to you, dear reader: a lifetime
love of programming and opportunities all based off of one thing – the
fun and joy of writing computer programs and writing code.
Sure, programming applications can be a pain in the butt. You will
find yourself banging your head against a keyboard on many nights and
yelling at the computer screen for hours only to find that your program
isn’t working because you forgot a parenthesis () somewhere.
But – once you find that mistake that you or another programmer
made – there isn’t quite anything like that triumphant moment when
you realize that you – YOU – are the greatest coder of all time!

Programming Dos and Don’ts


When reading this book, you may find yourself feeling the urge to skip
ahead a little or might want to skip an exercise or two. As in all things in
life, this piece of advice holds true in learning to program as well: if you
cheat, you are only cheating yourself.
To help keep you on the straight and narrow, here are some dos and
don’ts for reading this book and for learning how to program, in
general:
Do read the book straight through. While you might be okay to skip
a chapter or an exercise here or there, keep in mind that this book is all
about building a foundation of not just coding language, but coding
Visit https://ebookmass.com
now to explore a rich
collection of eBooks and enjoy
exciting offers!
practices, theory, and an understanding of programming principles that
you can take with you that apply to other languages as well.
Don’t copy and paste code from this book or any other source
(assuming you have a digital copy). Instead, take the time to type in the
code so that you can begin to get a feel for writing code and, perhaps,
commit some of the code to memory through repetition.
Do experiment with code. One of the best ways, I’ve found, to learn
how to truly code is to experiment. If you come across an example in
the book, feel free to change the parameters some and see what
happens. The worst that can happen is that you can fail. The best? That
you learn something new!
Don’t be afraid to Google other tutorials and how-tos on Python.
This book is supposed to build a beginner’s foundation, but it does not
teach you everything there is to know – that’s what the sequel is for! If
you do decide to look up comparative examples, be certain to look at
the date of the article and the version of Python. If the version does not
match the version we are using in this book (Python 3), odds are your
code will not work, and you will find yourself very confused.
Do document your code. We have not covered this topic – yet – but
for now, know that documentation means to leave little comments in
blocks, or sections, of your code that lets you (or another coder in the
future) know what you intended to do with a certain section of code.
While Python is a very readable language, the way every programmer
codes is different, and what might be apparent to you is not always
apparent to others. Also, if you have to review your own code at a later
date, it will make it easier for you to remember what, exactly, you were
trying to do at 4 a.m. 10 years ago!
Do plan out your code. That is, write down how you want your
overall program to work and then break that down into little sections.
Then, take those little sections and map out what you need to code for
each part. This way you will have a roadmap to follow and won’t just be
coding by the seat of your pants.
Finally, do test your code frequently and save your work often.
When we programmers are in the thick of things, we like to carry on,
plugging away, for hours at a time. However, if we don’t stop to test our
code and save our files, we risk losing hours of work and, worse,
creating a program with problems that are difficult to trace.
Any source code or other supplementary material referenced by the
author in this book is available to readers on GitHub
(github.com/apress). For more detailed information, please visit
https://www.apress.com/gp/services/source-code.
Acknowledgments
This book wouldn’t have been possible without Todd Green, who
reached out to me to write a book and listened to my ideas and,
thankfully, chose the one I wanted to write the most.
Celestin Suresh reached back out to me and had me write this
second version, for which I am eternally grateful.
James Markham and Andrea Gavana found all of my errors and
proved to me that, even at this old age, I still have a lot to learn. Who
knew – an old dog can learn new tricks.
Thank you to the entire editorial team at Apress, who were a
pleasure to work with and helped me do what I love to do most: write.
And make up stupid comic book characters.
Table of Contents
Chapter 1:​Introduction to Computer Programming and Python
Programming Language Overview
Python Overview
How Does Python Differ from Other Programming Languages?​
The Benefits of Python
Examples of Python in the Wild
Your First Python Program
Installing Python
Installing Python on Windows
Installing Python on Other Operating Systems
In This Episode!
Chapter 2:​It All Adds Up
Operator Precedence
Data Types:​Know Your Enemy
Converting Number Data Types
What Are Variables?​
Superhero Generator 3000
In This Episode!
Chapter 3:​Stringing Things Along
Leave Your Comments at the Door
Block Commenting
Inline Commenting
Other Uses for Commenting
Texting – Without Your Phone
Working with Strings and Variables
Longer Strings
Strings on Multiple Lines
Formatting Strings
Introducing a New Weapon to Your Arsenal:​Lists
Changing Lists
Other List Methods
In This Episode!
Chapter 4:​Making Decisions
Making Decisions
Conditional Statements
Behold – The If Statement!
Boolean Logic and Comparison Operators
Else Statements
Else-If Statements
Logical Operators
Nesting – Not Just for the Birds
In This Episode!
Chapter 5:​Loops and Logic
What Are Loops?​
Limiting Loops
For Loops
More Fun with For Loops
Break, Continue, and Pass Statements
In This Episode!
Chapter 6:​Using What We’ve Learned
Creating Your First Real Program
Importing Modules
Creating Our Variables
Defining Our Lists
Introductory Text and Accepting Input from the User
Creating Suspense!
Randomizing Superhero Names
A Quick Check-In
Randomizing the Superpowers
Finishing Our Program
The SuperheroGenerat​or3000 Code – Completed!
Chapter 7:​Saving Time with Functions, Modules, and Built-Ins
Defining Modules
Built-Ins
Packages
Creating Your Own Module
Common Built-In Functions
String Functions
Practice Your New Functions
String Function Examples
Number Function Examples
In This Episode!
Chapter 8:​Using Classes and Objects
What Is OOP?​
What Are Classes (And Will I Be Graded?​)
What Are Objects
Creating Our First Class
Creating Our First Object
Improving the Superhero Generator 3000!
Inheritance, Subclasses, and More!
Adding the Bells and Whistles
The New and Improved Superhero Generator 3000 Code!
In This Episode!
Chapter 9:​Introducing Other Data Structures
More Data Structures
What Are Tuples?​
The Tuple Functions
More Fun with Tuples
Tuple Examples
Working with Dictionaries
Dictionary Methods
More Fun with Dictionaries
Other Dictionary Methods
Example Dictionary Code
In This Episode!
Chapter 10:​Python Files
Working with Files in Python
File Types
Creating a Text File in Python Code
Reading Files in Python
A Warning About Reading and Writing to Files
Appending to Files
Working with Directories
Bonus Round!
FunWithFiles.​py Code
WorkingWithDirec​tories.​py
In This Episode!
Chapter 11:​Python for Gaming
Python for Gaming
Types of Games You Can Code in Python
Pygame Introduction
Installing Pygame
Setting Up the Pygame Bare Bones for a Game
Adding to Our Game Skeleton
Adding Images and Sprites in Pygame
Adding Text to Our Pygame Game Window
Drawing Shapes in Pygame
Adding More Events
In This Episode
Chapter 12:​Animating Games
Creating Animations in Pygame
Collision Detection:​Bouncing Off the Walls
Collision Detection:​Detecting the Window Boundaries
Colliding Two Objects
In This Episode!
Chapter 13:​Error Handling
Finding Errors
Types of Errors
Syntax Errors
Visit https://ebookmass.com
now to explore a rich
collection of eBooks and enjoy
exciting offers!
Logical Errors
Exceptions
The Try Except Else Block
Using Finally
Creating Custom Exceptions
Logging
Debugging Tools in Python
One Final Tip for Handling Errors
In This Episode!
Chapter 14:​Python Career
Working with Python
Career Paths for Python
Beta Tester
Code Debugger/​Bug Locator
Data Scientists
Software Developer/​Software Engineer
Video Game Programmer
Mobile Development
Web Development and Web Applications
System Administration
Research, Teaching, and More
Common Python Interview Questions
Can You Tell Me Some of the Key Features of Python?​
What Is the Difference Between a Tuple and a List
What Is Inheritance?​
How Do You Generate Random Values in Python?​
How Do You Create a List, Tuple, and Dictionary in Python?​
What Is the Difference Between a Local Variable and a Global
Variable?​
What Are the Different Data Types Python Offers?​
What Is a GUI?​What Python Library Is Best for GUI
Development?​
How Do You Open a File in Python?​
How Would You List the Functions of a Module?​
Other Python Interview Questions
Best Programming Practices
Follow Style Guides
If It’s Broken, Fix It (Now, Not Later)
Documentation Is Everything
Use Code Repositories and Packages
Test Often
Choose a Side:​Indentation or Spaces
Classes Are Great, But Not Everything Needs to Be One
The Future of Python
Python Terms
Index
Random documents with unrelated
content Scribd suggests to you:
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.

You might also like