Skip to main content
main-content

Über dieses Buch

Discover everything you need to know about Python to turn your passion of programming into a job you'll love. Fueled by fun and practical examples, this book gives high schoolers who want learn an easy programming language ideas for how to leverage them in the workforce.
Start with the basics and before you know it, you'll be building your own web sites, doing white-hat hacking, finding code bugs and errors, and creating games, including using Python to roll characters for RPGs. Every chapter is relaxed and informal, like learning with a cool teacher all the time.

Computers, phones and the web are your playground, and you'll be ready to join the party with your own content. Going beyond posts and uploads means learning to program, and Python is a great choice to get started. It's quick to learn, it's flexible, and if you want, it may get you a Python job that pays more than minimum wage when you're out of school. Python for Teenagers is the most fun you'll have while learning.
What You'll Learn
Review programming basics - you gotta start somewhere
Code applications that follow directions and make decisions
Understand Classes and objects - when a program is a child
Make games with graphics and animationWho This Book Is For

High schoolers who want learn an easy programming language.


Inhaltsverzeichnis

Frontmatter

Chapter 1. Introduction to Computer Programming and Python

Abstract
Computer programming – commonly referred to as “coding” by the cool kids – is the art of creating applications or software. These programs allow us to do everything from solve simple math problems and watch our favorite YouTube videos (I can’t get enough of skydiving bulldogs) to destroying hordes of rampant aliens in our favorite video games and even launching a real-life spaceship into outer space.
James R. Payne

Chapter 2. It All Adds Up

Abstract
Now that are we are all suited up in our metaphorical capes and super hero outfits (i.e., we have installed Python and learned how to use the IDLE), it is time to put our new super powers to the test! Our first villain? Perhaps one of the most nefarious, vile, contemptuous beasts of all time; a criminal of the school system, running rampant and threatening to destroy – or bore – every student in its path. The villain’s name?
James R. Payne

Chapter 3. String Things Along

Abstract
Welcome back intrepid hero! One thing you should know about super heroes and villains (especially villains) – they tend to rather worry. Thankfully, this chapter is all about increasing your abilities and granting you the new super power to handle all things text and text-related!
James R. Payne

Chapter 4. Making Decisions

Abstract
When it comes to fighting crime and dealing with villainous villainy (trademark pending!), we super heroes often find ourselves facing forks in the road: should we save the helpless damsel being thrown off the side of the building or do we let her plunge to the ground so that we can nab the bad guy? Do we wash our cape today or can we go one more day without it smelling too funky?
James R. Payne

Chapter 5. Loops and Logic

Abstract
Sometimes fighting crime can make you feel like you are running around in circles. Day in and day out you seem to have to tackle the same struggles: a bank robber here, a cat stuck in a tree over there, an evil genius trying to take over the universe. It is almost as if you are stuck in some sort of…loop.
James R. Payne

Chapter 6. Using What We’ve Learned

Abstract
You’ve come a long way thus far. You started off being bitten by a radioactive programmer when you made the unfortunate mistake of trying to grab his microwaveable pizza bites. From there, your powers began to blossom and you proved yourself a worthy sidekick. But now it is time to truly test your knowledge and your l33t cod3r skillz. Are you up for the challenge?
James R. Payne

Chapter 7. Saving Time with Functions, Modules, and Built-ins

Abstract
Now that we have officially created our first ever, full-blown Python application (back in Chapter 6 if you are skipping around!), it is time to begin learning how to truly harness our programming powers and becoming the best programmers we can be.
James R. Payne

Chapter 8. Using Classes and Objects

Abstract
Up to this point, we have covered some pretty standard programming language features and practices. This chapter will continue this tradition; however, the subject matter may be a little tougher to grasp at first glance. Don’t worry though – you have come this far, and we have watched you morph from stumbling sidekick to full-on, beastly hero.
James R. Payne

Chapter 9. Introducing Other Data Structures

Abstract
Welcome back budding hero! Looks like you’ve had a long day of homework, chores, and, of course, fighting crime. Now all that is left to do is eat your vegetables, put away your dishes, and for the love of God man, brush those teeth!
James R. Payne

Chapter 10. Python Files

Abstract
So far, we have worked primarily within one file; that is, all of our code has been saved in a single .py file and run from that same file. However, in the real world, a lot of our programs will be stored in multiple files. What’s more, we are likely to save some of our favorite code snippets and functions in files for later use. It is just the way we programmers – which includes you now – work.
James R. Payne

Chapter 11. Python for Gaming

Abstract
It is only appropriate that we have a chapter where we discuss creating video games in Python – after all, it is that very interest that got me started programming all those years ago when I was a kid. Things have progressed a lot since then; at the time, PC games were text-based with the only images consisting of really poor quality graphics or, worse, made out of ASCII characters.
James R. Payne

Chapter 12. Animating Games

Abstract
I see you came back for more punishment – good for you! The last chapter was pretty darned exciting, if I do say so myself. Not only did you get to learn some core game development theories and practices, you got to actually code some as well!
James R. Payne

Chapter 13. Error Handling

Abstract
We are rapidly approaching the end of this book and our time adventuring together. Soon, you will be donning your cape on your own, battling evil doers without my assistance (in your imagination only, of course!), and writing code all by yourself.
James R. Payne

Chapter 14. Python Career

Abstract
Well young hero, it has been a long journey. We have overcome many foes – nefarious villains like Jack Hammer and the vile Algebro. We have read through this mystical tome and gained insight and wisdom that have allowed us to enhance our powers to heights previously unknown. We are talking Mount Everest types of heights.
James R. Payne

Backmatter

Weitere Informationen

Premium Partner

    Bildnachweise