Adventures in Python
eBook - ePub

Adventures in Python

  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

Adventures in Python

Book details
Book preview
Table of contents
Citations

About This Book

The complete beginner's guide to Python, for young people who want to start today

Adventures in Python is designed for 11-to 15-year olds who want to teach themselves Python programming, but don't know where to start. Even if you have no programming experience at all, this easy to follow format and clear, simple instruction will get you up and running quickly. The book walks you through nine projects that teach you the fundamentals of programming in general, and Python in particular, gradually building your skills until you have the confidence and ability to tackle your own projects. Video clips accompany each chapter to provide even more detailed explanation of important concepts, so you feel supported every step of the way.

Python is one of the top programming languages worldwide, with an install base in the millions. It's a favourite language at Google, YouTube, the BBC, and Spotify, and is the primary programming language for the Raspberry Pi. As an open-source language, Python is freely downloadable, with extensive libraries readily available, making it an ideal entry into programming for the beginner. Adventures in Python helps you get started, giving you the foundation you need to follow your curiosity.

  • Start learning Python at its most basic level
  • Learn where to acquire Python and how to set it up
  • Understand Python syntax and interpretation for module programming
  • Develop the skills that apply to any programming language

Python programming skills are invaluable, and developing proficiency gives you a head start in learning other languages like C++, Objective-C, and Java. When learning feels like fun, you won't ever want to stop – so get started today with Adventures in Python.

Frequently asked questions

Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access Adventures in Python by Craig Richardson in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming in Python. We have over one million books available in our catalogue for you to explore.

Information

Publisher
Wiley
Year
2015
ISBN
9781118951842
Edition
1
ch01-pag23
YOU HAVE TRIED two basic Python programs when you set up your computer, but your real journey with Python starts here. Learning to program is a fun and powerful way to control computers. In the adventures in this book, you’ll learn the fundamentals of programming with Python and have a lot of fun as you travel through them. You’ll create pictures, games and a load of other great stuff. Best of all, you’ll develop skills and knowledge of the Python programming language, which you can go on to use to bring your own ideas to life!
On your Python programming journey, you’ll discover a new language, a new way to be creative and a new way to solve problems. In this adventure, you’ll start by learning some fundamentals and developing a solid foundation. In future chapters, you will revisit all the fundamentals you learn in this chapter and build on them to strengthen your ability as a programmer.
ImageD
The screenshots shown throughout the book were taken on a computer running Windows 7.
You may not be using a computer running Windows 7, of course. It’s not a problem if you are using a different sort of computer as Python is designed to be used on a wide variety of computers, no matter what the operating system is. All of the Python code in this book has been tested to work on Windows, Mac and Linux. The screenshots in this book may look a bit different from what you see in front of you, but there is no difference in the code.
By the end of this adventure you’ll already have travelled a long way. You will understand the importance of sequencing in programming and using input and output in Python. You’ll have covered the basics of if statements and while loops, both of which you will use a lot in later adventures. And you will have created a control console for a spaceship to help you launch into your next adventures! Don’t be alarmed—that may sound a lot to digest for a beginner but you’ll take it one step at a time and it’s much easier than it sounds.

What Is Programming?

First things first: before you start your adventures with Python programming it’s a good idea for you to be clear about what programming actually is.
Put simply, programming is controlling a computer by giving it a set of instructions so that it can perform a particular task.
ImageD
Programming is using a set of instructions to tell a computer how to perform a task. These instructions are written in programming language. There are many different programming languages; Python, Java, Ruby and C++ are just a few of them.
All of the programs and applications (known as apps) on computers have to be written by people, who use programming languages, such as Python, to tell the computer how to behave when it runs the programs. For example, the web browser you use to visit websites is a program that has been programmed by people, as are the games on your computer, the text messaging app on your phone and even the operating system that runs when you switch your computer on.
ImageD
Your phone is actually a computer. Even your television, washing machine, car and digital clock have computers in them. You may not realise it, but computers are all around us and are increasingly important for our everyday lives. All of these computers run programs and, with the ability to program, you have the potential to create, understand and control these devices that are all around us. Many different languages are used to write programs. In these adventures, you’ll be learning to use the Python programming language. Python is known for being good for beginners to use because it is relatively easy to read and also because there are lots of extra bits—known as modules—that can be added to it to allow it do all sorts of exciting things. In this book, you’ll use Python version 2.7, as it has better support for computer games programming.
The programming concepts that you learn with Python are common to nearly every programming language. This means that, once you’ve learned Python, you’ll find it easier and faster to learn other programming languages.

Opening IDLE

In order to use Python you’ll need to open an application on your computer that can run Python. One of the applications used for writing and editing Python programs is called IDLE, and this is installed by default when you install Python. If you haven’t already installed Python, do so now—you will find instructions o...

Table of contents

  1. Cover
  2. Title Page
  3. About the Author
  4. Introduction
  5. Adventure 1: Diving into Python
  6. Adventure 2: Drawing with Turtle Graphics
  7. Adventure 3: Windows, Buttons, and Other GUI Stuff
  8. Adventure 4: More GUI Elements with Tkinter
  9. Adventure 5: Drawing Shapes with PyGame
  10. Adventure 6: Adding Keyboard Input with PyGame
  11. Adventure 7: Creative Ways to Use a Mouse with PyGame
  12. Adventure 8: Using Images with PyGame
  13. Adventure 9: Using Sounds and Music with PyGame
  14. Adventure 10: Your Really Big Adventure
  15. Appendix A: Installing and Downloading the Proper Files
  16. Glossary
  17. End User License Agreement