Book Image

Python Projects for Kids

By : Jessica Ingrassellino
Book Image

Python Projects for Kids

By: Jessica Ingrassellino

Overview of this book

Kids are always the most fast-paced and enthusiastic learners, and are naturally willing to build stuff that looks like magic at the end (when it works!). Programming can be one such magic. Being able to write a program that works helps them feel they've really achieved something. Kids today are very tech-savvy and cannot wait to enter the fast-paced digital world. Because Python is one of the most popular languages and has a syntax that is quite simple to understand, even kids are eager to use it as a stepping stone to learning programming languages. This book will cover projects that are simple and fun, and teach kids how to write Python code that works. The book will teach the basics of Python programming, installation, and so on and then will move on to projects. A total of three projects, with each and every step explained carefully, without any assumption of previous experience.
Table of Contents (18 chapters)
Python Projects for Kids
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Functions


Once we have variables, we can use them to do some pretty interesting things. The most interesting thing is to build functions. Python functions are blocks of code that we can build to do a specific job. We build these functions once, and then we can reuse them in our code just by typing the name. This is really helpful. For example, if I need to write a program that adds two numbers (a calculator, for example), I do not want to have to write three or four lines of code every time I want to add two numbers. Instead, I want to write one function that can add two numbers together, and then use that single line whenever I need to add numbers.

Before we begin building functions of our own, we need to also know that Python has a lot of amazing functions that are built in. Some of Python's functions are things we will use all the time. Others we won't talk about in this book, but as you become a more skilled programmer, you will learn more about Python's built-in functions.

Built-in functions...