Python Coding for Kids
Learn to Program Your Own Games and Apps through Self-Development
Harvey Lukes
Copyright 2020 - All rights reserved.
The content contained within this book may not be reproduced, duplicated or transmitted without direct written permission from the author or the publisher.
Under no circumstances will any blame or legal responsibility be held against the publisher, or author, for any damages, reparation, or monetary loss due to the information contained within this book, either directly or indirectly.
Legal Notice:
This book is copyright protected. It is only for personal use. You cannot amend, distribute, sell, use, quote or paraphrase any part, or the content within this book, without the consent of the author or publisher.
Disclaimer Notice:
Please note the information contained within this document is for educational and entertainment purposes only. All effort has been executed to present accurate, up to date, reliable, complete information. No warranties of any kind are declared or implied. Readers acknowledge that the author is not engaged in the rendering of legal, financial, medical or professional advice. The content within this book has been derived from various sources. Please consult a licensed professional before attempting any techniques outlined in this book.
By reading this document, the reader agrees that under no circumstances is the author responsible for any losses, direct or indirect, that are incurred as a result of the use of the information contained within this document, including, but not limited to, errors, omissions, or inaccuracies.
Table of Contents
Introduction
Whether you want to uncover the secrets of the universe, or you just want to pursue a career in the 21st century, basic computer programming is an essential skill to learn. - Stephen Hawking
In todays digital world, programming is a basic skill thats as important as reading and writing. Its no longer something used only by engineers and computer scientists.
Back in the old days, computers were massive pieces of equipment that could fill entire rooms. They were difficult to operate and too expensive for regular people to afford. But now, everyone has one. In fact, most people have more than one. Just think about the phone in your pocket, the laptop or desktop lying on your desk, and that new tablet youd love to have if you dont already. Computers are everywhere and are easier to use than ever before. But still, not that many people learn how to code, and that leaves them at a disadvantage.
Learning how to program isnt that difficult anymore. In fact, modern schools already teach coding as an essential skill to kids who are in the first years of elementary. Did you know that Elon Musk, the founder of SpaceX and Tesla, learned how to code when he was just a kid? He was around 10 years old when he started programming, and by the time he was 12, he sold his first game for $500. Then he grew up and founded a company that will hopefully one day enable us to colonize Mars.
Being a programmer is more than just a job. Having the skill to read and write code will allow you to better understand how computers work. Youll be able to use your creativity to entertain others by creating fun games, or help people by solving their problems with your applications. And before you know it, your mom and dad will call you every few days to come and fix their computer problems.
Coding can be fun and addictive because we all experience pleasure when we manage to solve a problem, and thats what programming is all about. You have a problem, a puzzle to solve, and you need to think of a solution. Once you do, you reap the rewards. So, if you learn how to code today, youll start your life with opportunities all around you.
But where should you start? After all, if you do a Google search on coding, youre going to be blasted with dozens of programming languages you may not have even heard of. There are actually hundreds of languages out there, some decades old and barely used anymore. Some of them have a specific use, and they focus purely on web-development. Others are the pinnacle of game programming. The decision is a hard one to make, but in the end, the principles behind coding are the same. The only thing thats truly different is the learning curve.
To get you started in the world of programming, this book will teach you Python, one of the most popular and easy to learn languages. Python is being widely taught in schools, universities, and is used by professionals from diverse tech fields.
The best way to learn it is through practice. This book is designed in such a way to guide you through all the steps you need to take to learn the language. Just follow along with the examples and try to do them as well. Then try to create or replicate the games and apps you find in the book. You can give the book a read first to get an idea about how programming works, and then start working through each section. If you dont understand something, dont worry about it, because thats only normal. It just means you need more practice. The more exercises you do, and the more you repeat the steps in this guide, the easier itll be to learn the difficult concepts. Remember that even professionals spend hours and days trying to figure things out. Theres no such thing as the perfect programmer. Accept your mistakes, learn from them, and above all, have fun!
Chapter 1: Starting Your Journey
Not that long ago, programming was an unknown and unpopular activity favored by computer wizards. Things used to be analog, computers werent used very often, and most households didnt even have one. Fortunately, you were born in the digital age and now everything runs on computers. Chances are, you dont even have an old fashioned clock that keeps ticking every second. Your parents probably dont vacuum or sweep the floors of your home because they have a robot vacuum cleaner doing all the hard work. Everything runs on computers, whether its a humble clock, a watch, a doorbell, or a car driven by artificial intelligence. All of these have to be programmed by someone so that we can all have a better life. This is where the future you comes in to save the day!
You picked up this book because you want to be a programmer, a coder, someone with a vision to share with the rest of us humble mortals. Maybe you love playing games and one day you want to use your creativity to tell a story through a cool game. What if I told you, you could do that after reading this book and doing some of the exercises? You dont have to wait to go to college to become a programmer. All you need is a desire to learn and to have fun!
But what is programming? What does it really involve? Lets find out!
What Does It Mean to Program?
Many people get into coding because they love computers and they want to create things. Some want to become game developers, while others want to build cool robots. Programmers can do all that because all they really have to do is write a set of instructions that tell the computer what to do. Its kind of the same way your mom or dad instructs you to throw out the garbage or do your homework. Thats how a computer works, too. It doesnt really do much if you dont order it. Computers are a bit lazy that way. They need a coder to use his or her imagination and write a set of instructions for them to execute.