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

A quick task for you


In this chapter, you learned a lot about how to write programs that can make decisions. Here are some questions to answer:

Q1. How many times can the elif statement appear in the if/elif/else flow?

  1. Only once

  2. Twice

  3. As many times as it is needed

  4. Ten

Q2. Which statement starts a conditional block of code that is used to make decisions?

  1. else

  2. if

  3. elif

  4. while

Q3. Which statement is only used at the end of a conditional block of code?

  1. else

  2. if

  3. elif

  4. while

Q4. What is a global variable?

  1. A variable that is only used in one function

  2. A variable that can be shared with many functions

  3. A variable that uses global before its name if it is inside a function

  4. Both 2 and 3

Q5. What is a while loop?

  1. A loop that runs code only once

  2. A loop that runs code a set number of times

  3. A loop that repeats code until something different happens, and then it stops

  4. A loop that does nothing