Aarthi Elumalai

Introduction to Python for Kids

Learn Python the Fun Way by Completing Activities and Solving Puzzles

1st ed.
Aarthi Elumalai
Chennai, Tamil Nadu, India
ISBN 978-1-4842-6811-7e-ISBN 978-1-4842-6812-4
© Aarthi Elumalai 2021
This work is subject to copyright. All rights are solely and exclusively licensed by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed.
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.

Dedicated to My Daughter and to the rest of my family who believed me when no one would and stood by me through everything.

Introduction

This book is the perfect blend of education and fun for kids 8 years and above looking to learn one of the easiest languages they can use to develop almost everything from websites to desktop apps to games to AI. It will include four big projects (or capstone projects): three games with Turtle, Tkinter, and Pygame and a desktop app with Tkinter.

The book starts with an overview of basic programming concepts such as variables, numbers, and strings while creating fun, personalized mini projects like “Print your name” and “Is your mom tipping enough.” It then dives right into Turtle, a Python library custom-made for kids, where they’ll learn how to draw, animate, automate, and eventually make colorful mini projects based on the Python concepts learned. Once they have built a foundation in programming and the Python language, they will learn all about building desktop apps with Tkinter and games with Pygame.

There is also an entire chapter dedicated to more fun puzzles and activities that come with a step-by-step solution, and another chapter with cool ideas for more puzzles, and a section that gives them advice on where they can go from there. By the end of this book, kids will learn Python from the inside out while creating projects that they can showcase to their friends, families and teachers. They will develop problem-solving skills along with programming skills while doing the puzzles and activities described in the book.

This book is really jam-packed with information, but do not worry, I made sure that you will not be bored. You will not feel like sitting in another one of your boring classes at school, I promise.

I have included a lot of fun activities, mini as well as big projects throughout this book. There are also a lot of puzzles and even more activities at the end of the book, so you will not have a boring minute.

../images/505805_1_En_BookFrontmatter_Figb_HTML.jpg

In Chapter 1, I’ll give you a brief introduction to Python, its uses, and an overview of what’s covered in this book and how to get the most out of it.

In Chapters 2 and 3, I will start by guiding you through the steps required to install Python in your system. It is quite easy to do, do not worry.

Then, you will create your very first program. Yes, you will start coding from the get-go!

In Chapters 4 and 5, you will learn all about numbers, performing mathematical calculations with Python, and the various cool tools Python equips you with to perform your magic with numbers. You will start coding real Python programs in this chapter.

Chapters 6 and 7 are where things get interesting. You will learn how to create a lot of cool graphics with Python’s built-in module, Turtle. Remember the add-ons I told you Python had to help you make awesome stuff? Turtle is one of the best of them. With Turtle, you can literally draw on the screen, and it will be automated!

Once I have taught you Turtle, I will use it in the next chapters to make things more colorful.

In Chapter 8, you will learn how to play with alphabets, words, and sentences in Python. You will learn how to print things, extract words from sentences, find words in sentences, and a whole lot more.

Chapter 9 is where you will learn about conditions. There is always a cause and effect in life. If something happens, something else will happen because of it. “If I ace my test, my mom will praise me.” That is a cause and effect. You will learn how to apply scenarios like that and use it to create fun little mini games (you will see how) in this chapter.

What if you want to print every number from 1 to 100? What if you do not want to write more than four lines of code to do that? You will learn how to do that and use the power of automation to automatically draw your graphics and animations in Chapter 10.

In Chapter 11, you will learn how to store a lot of information in one place. You will start using the real power of Python from this chapter onward.

In Chapter 12, we’re going to take a break from all the learning and create fun mini projects based on the concepts we’ve learned so far.

In Chapters 13 and 14, we will take a long look into real-world programming. We will look at true automation with functions and real-world problem-solving with objects.

In Chapter 15, you will learn how to automatically manipulate files with Python.

From Chapter 16, we will go back to having fun with Python! In Chapters 16, 17, and 18, you will learn all about a powerful package called Tkinter. You can use it to create desktop-based apps and games. You will learn how to use the package to create a paint app you can show off to your friends and a tic-tac-toe game you can play with your friends.

In Chapter 19, we will revisit Turtle and create a fun project with it. Let us create a snake game, shall we?

In Chapters 20 and 21, I will focus on making you a budding game developer. Let us learn how to use Pygame to create awesome games and make a space shooter game you can modify to your heart’s content!

In Chapter 22, we will learn the basics of web development with Python. We will not delve too much into it, but I will give you an introduction to get started.

In Chapter 23, we will go back to solving puzzles and activities. We will even make a couple more mini projects!

Chapter 24 is the final chapter. I’ll give you ideas on new projects and mini projects you can try with what we’ve learned in this book and also advice on what you can do next. What is covered in this book is just the starting point. There is a lot more to Python, and I will point you in the right direction to continue your journey.

Table of Contents
Index 545
About the Author
Aarthi Elumalai

is a programmer, educator, entrepreneur, and innovator. She has a Bachelor of Engineering degree in Computer Science from Anna University, Chennai.

Since then, she has managed a team of programmers and worked with hundreds of clients. She has also launched a dozen web apps, plug-ins, and software that are being used by thousands of customers online.

She has over 15 years of experience in programming. She started coding in Basics at the age of 12, but her love for programming took root when she came across C programming at the age of 15.

She is the founder of DigiFisk, an e-learning platform that has more than 60,000 students all over the world. Her courses are well received by the masses, and her unique, project-based approach is a refreshing change to many. She teaches the complex world of programming by solving a ton of practical exercises and puzzles along the way. Her courses and books always come with hands-on training in creating real-world projects using the knowledge learned, so her students get better equipped for the real world.

When she is not working on her next course or book, you’ll see her researching her next product idea and refining her existing products. She is currently committed to bringing the sheer power of artificial intelligence to make life easier for small business owners.

 
About the Technical Reviewer
Ashwin Pajankar

holds a Master of Technology from IIIT Hyderabad. He started programming and tinkering with electronics at the tender age of 7. BASIC was the first programming language he worked with. He was gradually exposed to C programming, 8085, and x86 assembly programming during his higher secondary schooling. He is proficient in x86 assembly, C, Java, Python, and Shell programming. He is also proficient with Raspberry Pi, Arduino, and other single-board computers and microcontrollers. Ashwin is passionate about training and mentoring. He has trained more than 60,000 students and professionals in live and online training courses. He has published more than a dozen books with many international and Indian publishers. He has also reviewed numerous books and educational video courses. This is his fifth book with Apress, and he is working on more books. He regularly conducts programming bootcamps and hands-on training for software companies in Nashik, India.

He is also an avid YouTuber with more than 10,000 subscribers to his channel. You can find him on LinkedIn.

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

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