© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2021
A. ElumalaiIntroduction to Python for Kids https://doi.org/10.1007/978-1-4842-6812-4_1

1. Did You Know?

Aarthi Elumalai1  
(1)
Chennai, Tamil Nadu, India
 

I have written the first part of this chapter for parents and the rest for the kids. I hope to convince you of the importance of programming and Python as your kid’s first programming language in this chapter. If your kid is older (10+), they can read those topics themselves. In the latter half of the chapter, I’ll address the kids and give them a brief overview of all the fun stuff they can do with Python, what they’ll learn from my book, and how to use my book to its full capacity.

So, let us get started.

What is programming?

You have your gadget – your laptops, PCs, tablets, mobile phones, and so on – and whenever you ask it to do something, within reason, it does it. How? Well, that is because every time you task your gadget with something, the pre-programmed set of instructions it has pertaining to that task will fire up in the background. Those set of instructions are called code.

../images/505805_1_En_1_Chapter/505805_1_En_1_Figa_HTML.jpg

You will find that your gadgets need a complete set of instructions to perform even the simplest tasks, like opening an application or performing a calculation. They are just machines after all, just 1s and 0s at the base of it all. They cannot think on their own, so with our code, we are making them think.

In other words, programming is the language your computer speaks, and the different programming languages are the different languages it understands/speaks. You might know English, French, and Mandarin, but you might not know Italian or Japanese. Similarly, out of the, literally, hundreds of programming languages out there (Python, JavaScript, C, C++, C#, Ruby, etc.), your computer might speak a few, or just one, and not understand the rest.

Why should your kids learn to code?

Now that you know what programming is and how it literally runs the digital world, I shouldn’t have to give you a lot of reasons to convince you to teach your kids coding, am I right?

But still, you might be wondering why your kid needs to learn programming, and why should they learn now. After all, in our time, people learned programming in college and only if they decided to become a programmer.

Well, I think I have a couple of reasons that will convince you why, in this day and age, kids, regardless of their future career aspirations, should learn programming, and why it is prudent that they start now.

Programming is like Math

Thirty years back, no one would have dared make such a statement, but now, times have changed, and yes, programming is, indeed, like Math. It is everywhere, just like Math is.

../images/505805_1_En_1_Chapter/505805_1_En_1_Figb_HTML.jpg

Math was a part of our educational requirement until we were at least 18, but not everyone of us is a mathematician today. Then why was Math forced down our throats? Well, because Math runs everything. We need basic mathematics in our daily life and certainly in most of our careers. So, we learned everything from calculus to algebra to geometry, knowing very well that we would probably not use 90% of our knowledge when we grew up.

That is exactly the case with programming today. Everything is digitized. There is an app for everything from food delivery to stock market prediction. Computers have entered every field, including traditional fields like construction and manufacturing. Most of the construction equipment are digitized nowadays, and what powers them? Programs, and thousands of lines of code.

Even art is digitized. So regardless of the field your kid is getting into, their knowledge in programming is going to give them a leg up.

But apart from that, coding also improves a kid’s mathematical capabilities by fostering logical thinking and problem-solving.

Coding improves logical thinking and creativity

A contradictory statement, but true in this case. Every code blocks your child creates will be logically driven.

Logic dictates programming, and once they start coding on their own, they will learn to dissect a problem into bite-sized components, apply logic to solve each component, and then finally combine all the components into a coherent solution.

../images/505805_1_En_1_Chapter/505805_1_En_1_Figc_HTML.jpg

That is how problem-solving works in the real world, regardless of field, and they will learn this invaluable skill as a child.

But let us be honest, your kid would be bored with just logic. That is where creativity comes in. The world runs on both creativity and logic, and the same holds true for programming.

There is no right answer in programming. If they are solving the problem, how they are solving it does not matter. There are best practices, of course, but if you ask two programmers to solve the same problem, chances are, their code blocks will look completely different.

So, while coming up with a solution, and multiple solutions for multiple problems down their programming journey, they will foster creativity as well.

The best of both worlds, don’t you think?

Coding is the future

Let us be very honest here. We are moving toward a completely digitized society at an amazingly fast pace. Everything is digitized. Apps are everywhere. Artificial intelligence is making new waves in the world every single day. Before we know it, we will have artificial intelligence–driven technologies cleaning our houses and driving our cars.

It is no wonder that programming has become an invaluable skill in today’s world, and the demand for programmers is just going to increase every year.

So, coding is indeed the future, and by learning to code at a young age, your child will have a leg up over their competitor. Sounds good, but why does your kid need coding if they were going to become a mechanical engineer, for example? Or a financial analyst?

../images/505805_1_En_1_Chapter/505805_1_En_1_Figd_HTML.jpg

This brings me back to my original argument. Everything is digitized, and coding is everywhere, in every single field. So, if your kid has a programming base, then will they not stand out from the rest?

For example, a financial analyst with knowledge in programming can code a stock prediction application themselves and hence save the company tons of resources, or they would at least be fluent enough in tech talk that they’d guide the programmers better and save their boss hundreds of production hours and back and forth.

So, regardless of what your kid is going to study in the future, coding is going to help them out, and in the immediate future, they have a monetizable skill they can use to make extra cash.

In their teenage years, they do not have to flip burgers at minimum wage as a side gig. They can freelance as a software developer and make at least three to four times more money working half the time.

Or better yet, your kid could decide to become an entrepreneur. As you know, almost every startup relates to programming and software in some way, so as a programmer, your kid can code the app themselves and easily save tens of thousands in programmer fees.

I believe those are very convincing arguments as to why your kid needs to start learning to code right now.

Why Python?

../images/505805_1_En_1_Chapter/505805_1_En_1_Fige_HTML.jpg

Alright, now you are convinced about the benefits of your kids learning to code, but why Python ? Out of the tens of popular programming languages out there, why should they start with Python?

I firmly believe that Python should be the first choice of real-world programming for a kid and let me convince you why.

Python is easy

Well, that is pretty much it. Kids want to have fun, and if we want them to learn programming, it needs to be fun and easy. Python is both.

Unlike the other older languages where you need to learn a lot of syntaxes and theory before you can create your first program, Python is very straightforward. The syntax is easy to understand and logically sound. “Print” just prints something on the screen. Easy to remember, right? There is not a lot of memorizing to do, and your kid can start coding and creating from the get-go.

It is the perfect programming language for beginners with no prior knowledge of programming, and it is even better for kids because it is also fun.

Python has a lot of built-in kid-friendly modules and libraries that will help them draw graphics and create games and fun apps with just a few lines of code.

It can do a lot of things

Now, do not underestimate Python because it is easy to learn. It can be used in literally everything from web development to desktop app development to artificial intelligence.

The language is immensely powerful, and the libraries and modules that come with it are even more powerful. You have add-ons for everything.

You can create graphics with Turtle, beautiful desktop apps with Tkinter (like the calculator app you’re so fond of using on your laptop), create professional games with Pygame, develop full-blown websites and web apps with Django or Flask, and apply machine learning (artificial intelligence) algorithms with a host of easy to learn libraries. The possibilities are endless with Python.

By starting their programming journey with Python, your kids are not just stepping into the world of coding, they are also equipping themselves with skills in one of the most highly sought-after (and paid) programming languages of this time.

What more? With the rate at which Python’s popularity, and its adoption into fast-moving fields like artificial intelligence, is growing, it is obvious that Python is here to stay, so your kids’ skills are unlikely to go stale in the future.

From this point onward, I will be addressing the kids.

Python is fun!

Hi there! So, you are here to learn Python. Not only is it easy to get started with, it also comes with a lot of bells and whistles that make programming fun for you. Would you like to know all the cool things you can create with Python?

Games!

Who does not love games, am I right? But what if you can create your own games and then play them with your friends? You will be the most popular kid in class if you can do that.

../images/505805_1_En_1_Chapter/505805_1_En_1_Figf_HTML.jpg

What more? You can change the features of the games as you like. Want five lives instead of three? Great, add two more. Not enough levels and you are bored already? Code more levels into your game! Make those levels extra difficult to give yourself a challenge. You have the freedom to do anything you want with the games you create, and you can even get suggestions from your friends and apply them to your games.

With just a little bit of coding, you will be able to modify the games you have always been dissatisfied with or create a brand-new game you can play with your friends.

So, you will have fun while coding and after coding (while playing the games).

Graphics and animation

For me, graphics and animations are the next best thing right after games. What about you?

../images/505805_1_En_1_Chapter/505805_1_En_1_Figg_HTML.jpg

Imagine running a program that draws a design you created in real time. What about an animation? What if you can create designs and animations and use them in that game you have always wanted to create and play?

Like I always say, the possibilities are endless, and they are only limited by your creativity and imagination. Run wild with Python!

Websites

Do you use the Internet? Then you must have visited at least 100 websites by now. They look great, don’t they? What if you can create a website just like your most favorite website?

If you learn Python, you certainly can.

I am not talking about simple websites. I am talking about big, full-blown websites and web apps with a lot of cool features. You could even create websites and apps like Facebook and Instagram with enough practice.

Apps

Python comes with a lot of tools, just like the tools you use in your games. These tools are called libraries and packages in Python. With the help of these libraries, you can create almost anything, including apps.

../images/505805_1_En_1_Chapter/505805_1_En_1_Figh_HTML.jpg

Do you use a laptop or tablet? It comes with a lot of cool apps, right? There is a calculator app, a stopwatch/timer app, paint app, and so on.

What if you can create those exact apps? Well, with Python, you certainly can. In fact, you will learn to create some of those apps right in this book. Are you excited?

Not just that, with packages like Kivy and PyQt, you can even start creating mobile apps with Python. We will not be talking about those packages in this book, but as you can see, you have a lot of possibilities with Python.

Whew! That was a big list indeed. The world is your oyster with Python, so come and play!

Getting the most out of this book

This chapter (and the last) would be the only two chapters with a lot of text. I have tried my best to keep things interesting and practical in the rest of the chapters.

You will come across a lot of examples that illustrate every topic we cover. There will be a lot of coding, so I recommend you code the examples along with me. Try not to copy and paste. Type everything out so you get familiarized with coding.

../images/505805_1_En_1_Chapter/505805_1_En_1_Figi_HTML.jpg

Every chapter comes with a lot of activities, puzzles, and mini projects with detailed, step-by-step solutions too. I would recommend following along with the solutions in the first few chapters, but once you are confident enough, try solving the puzzles/activities on your own and then cross-verify with the given solution.

Remember, there are no wrong solutions in programming! If you get the desired result, you are good to go.

This book includes four capstone projects (big projects) as well to solidify your knowledge of Python. I would recommend creating the projects, but do not stop there. Try changing things in every project to make it your own. Of course, do not forget to show your projects to your family, friends, and teachers as well!

That is pretty much it. It is an easy-to-follow along book, so do not get overwhelmed by the size of it. Just get started and start coding.

Summary

In this chapter, which was addressed to the parents (in the first half) and the kids (in the second half), I gave a brief explanation of what programming is and why your kids need to learn to code at such a young age, regardless of their future aspirations. I also gave convincing arguments on why Python should be the first real-world programming language of choice for a kid and what a kid can do with Python. We ended the chapter with a brief overview of everything you will learn from this book and the best way to utilize this book to its full capacity.

In the next chapter, we will learn how to install Python and create and execute our very first Python programs.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.131.72