paint-brush
Python for Kids: A Fun and Easy Guide to Learning the Popular Programming Languageby@olaoluwa
426 reads
426 reads

Python for Kids: A Fun and Easy Guide to Learning the Popular Programming Language

by Olaoluwa AfolabiMarch 17th, 2023
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Python is a computer programming language created by Dutch programmer Guido Van Rossum. As Guildo Van Rossum was developing this computer programming language, he was also watching a 1970s BBC comedy series called "Monty Python's Flying Circus." He thought he needed a simple name, short, unique, and mysterious. Then, he named this computer programming language "Python".

People Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Python for Kids: A Fun and Easy Guide to Learning the Popular Programming Language
Olaoluwa Afolabi HackerNoon profile picture


Note: This essay is intended particularly for children to help them comprehend without using technical jargon. It is not intended for entry-level, intermediate, or senior software engineers.


In this introductory section, we'll understand what Python is, and how we can set it up.

Content Purpose

1. You'll get to understand the nature of this computer language.

2. You will understand what Python can be used for.

3. The versions of Python and it's history

4. Installing Python on your computer system

A. What is Python?

One thing I want you to understand at your age is that; Python in this case, is not an animal. It is a computer programming language and was created by Dutch programmer called Guido Van Rossum. Yes, I am talking to you if you are under 12 years of age. I created this piece of content to assist you with comprehending the programming language without getting bogged down in technical/coding/programming jargon. Let us proceed.


As Guildo Van Rossum was developing this computer programming language, he was also watching a 1970s BBC comedy series called "Monty Python's Flying Circus." He thought he needed a simple name, short, unique, and mysterious. Then, he named this computer programming language "Python".


Programming languages are created to give computers instructions, just the same way your parents use the English Language to give you instructions to do one thing or the other.


Now, to answer what Python is, we can say; Python is:

1. a solver language (i.e. an interpreted language)

This means that the instructions you give to your computer are not solved by the computer; they are solved by Python itself.


Therefore, your code will work on any computer that has Python installed on it. If your Dad and Mummy have Python installed on their computers, your python code will work on it.

2. interactive

Interactive computer languages are close to human languages, such as the English Language, Chinese, Yoruba Language, etc. This helps you to relate with your computer as if you are talking to your friends and playing hide-and-seek.

3. behaves like real-life objects (i.e. object-oriented programming language).

Let's start explaining this by asking a question:


What are the objects you can point to in your house?

Hint: The objects you can feel and touch.


I will answer this and say; LEGO Toy, Baby Dolls, Table, Chair, Bicycle, etc.


For example, LEGO is an object that comes in small cubes, which you can use to make a bigger object such as Car, House, etc. Building a house with LEGO, you can create a Window, the Roof, the Wall, and so on, and then join them together to make a House. You can "reuse" your LEGO again and again. You can use your Table again and again. You can use the Chair alone with another Table. You can take it to the playground and sit down on it. You can move it around.


Python programming language behaves like an object too. You can use it to arrange the instructions you are giving to the computer and then "reuse" those instructions multiple times.

4. high-level language

Earlier, we talked about interpreted language, and we said Python is an interpreted language. This point will be useful in understanding what high-level languages are.


Python is a high-level language because the code/instruction you wrote in Python the computer doesn't understand it. It means that; the Python you installed on your computer has the duty of doing two things, which are:


  1. it understands the instruction/code that you wrote for the computer to do, and

  2. it interprets it to what the computer will understand before the computer can do it and give you results.


So, high-level language is a language that cannot be understood directly by our computers. The only language the computer understands is Machine Language. Python will always convert your own code/instructions to bytecode, which is then converted to Machine Code that the computer understands.

B. What can Python do?

Python is a "General Purpose" computer language. This means you can use it to create anything that comes to your mind. So, Python can be used to do a lot of things.

In fact, let's even call it a tool that can be used to create anything you can use on your computer and mobile phone. Just like how you can use your Crayon to color any diagram. Just like you can use LEGO to build anything or any shape you want.


However, let's talk about some computer things you can use Python for. You can decide to focus on any of these paths:


  1. Web Development


    You can use Python to create websites and web applications. It has special solutions too, such as Django and Flask, which specifically makes it easier to build web apps such as instagram.com.


  2. Data Analysis


    You can use Python for Data Analysis. Let's explain:


    Sometimes we collect a lot of numbers and information about things, like how many apples we have or how tall our friends are. Data analysis helps you with all that information. It helps you to find patterns in it too. Just like how we put together puzzle pieces to see the whole picture, we use data analysis to put all the numbers together to see what they tell us. For example, we might find out that we have more red apples than green apples or that our tallest friend is also the oldest. Data analysis helps us to learn more about the world around us by looking at all the information we have.


    Python has powerful solutions for you to do Data Analysis. Some of those solutions are called Pandas, NumPy, and SciPy. They make it easy to analyze and interpret lots of rough information in pictures you can understand easily. You can use these special solutions to make decisions about the pieces of information.


  3. Automation


    Python can be used to help you to do things that you repeat all the time, such as sending emails, downloading files, and scraping (copying) things from a website on the internet. Python has special solutions for these types of homework, too and it helps you do it by itself. Once you tell the computer how it will do it, it will do it for you, and you can sleep while the computer does the work for you. Examples of such solutions are Selenium and Beautiful Soup, to copy things online and save it automatically.


  4. Artificial Intelligence (AI)


    Python is used a lot in Artificial Intelligence (AI) and Machine Learning.


    The idea around Artificial Intelligence is to mimic/copy humans’ intelligence. To act the way humans do, such as solving mathematics, writing letters just like the way your Daddy and Mummy will write, and so on.


    Machine learning is like teaching a computer to learn on its own, just like how we learn new things as we grow up. We teach computers by showing them examples and telling them what to look for. For example, if we wanted to teach a computer how to tell the difference between apples and oranges, we would show it many pictures of apples and oranges and tell it which ones are apples and which ones are oranges. Then, the computer would try to figure out on its own how to tell the difference between them. Machine learning helps computers to learn and get better at doing things without us having to tell them every single step.


    Therefore, Python is used extensively in Artificial Intelligence (AI) and Machine Learning. There are so many solutions built to help you do Artificial Intelligence and Machine Learning, Some of them are TensorFlow, PyTorch, and Keras to build deep learning models and train them on large datasets.


These are a few places where Python can be used. There are other places like Scientific Computing (i.e. Hard Mathematics) and solutions such as SymPy and SciPy are available for that. It helps you solve complex mathematical problems and perform simulations. Hopefully, when you learn Python well, someday, you too will be able to impact your community by creating solutions that specifically solve a problem.

C. Python versions

There are different versions of Python, like how you might have different versions of your favorite toy. The newest version of Python is called Python 3, which is like having the newest and coolest version of your toy. Older versions of Python are like having an older version of your toy that might not have all the fun features of the new version. It's important to use the newest version of Python so that you can create the coolest things and keep your computer safe.


  1. Python 1.x: The first version of Python, released in 1991.


  2. Python 2.x: The second major version of Python, released in 2000. Python 2.x was widely used for many years, and many popular special solutions like the ones we described above were built with it.


  3. Python 3.x: The current version of Python, was first released in 2008. Python 3.x introduced several changes and improvements over Python 2.x, but is not backward-compatible with it. Many developers have since switched to Python 3.x, but some solutions/systems still use Python 2.x.


Note that; the “x” in front of these versions means that there are versions released that fix some problems in that version.


D. Installing Python

This is the section I think your parents can follow to prepare a perfect computer environment for you to jump into python programming. So call on Mummy & Daddy to help you. However, I will focus on explaining well enough for you to do it yourself.


Now, note that computer systems some years ago came with Python already installed. So it is possible your computer has it already installed. But how will you know? Please, follow the steps below to check:


For Windows


  1. Open “Command Prompt“ on your windows computer, then type python --version, it will return a response that will actually show the version installed or simply tells you it doesn’t exist and it can’t understand what you typed.


For Linux & MacBook


  1. Open “Terminal” on your system, then once it is open, type python --version, what you will see will look like the output below:


    tiwa@Olaoluwas ~ % python --version
    Python 3.10.2
    


    If you have a response like this, then it means Python is already installed and you can see the version on your system. In my own case, it is version 3.10.2.


If you figure out that you do not have Python already installed on your computer system, that is not a problem. Please follow the steps below to install it on your computer:


  1. Go to https://www.python.org/downloads/ and click on “Download Python 3.11.2” button to download Python. Version 3.11.2 is the current version as of the time of writing this information.


  2. Go to your downloaded file and double-click on it to install. You will see a screen. Follow the prompts. But most importantly, if you are using Windows system, make sure two boxes titled “Install launcher for all users (recommended)” and “Add Python 3.x.x to PATH,” on the screen are selected, and then click on “Install Now.”


  3. For Windows, the screen will show you it is successfully installed and most likely show a box saying, “Disable path length limit.” Please click it, then close the screen


For Linux & Mac, you can’t go wrong. Just click “continue” throughout, and accept the terms and conditions if it is asking you to do so to continue.


Testing Python


Now, I believe you have successfully installed Python. You can see the example below. we tried to do 2 + 2 = 4. Let’s test it:


  1. Open your Terminal if you use Linux/Mac or Command Prompt if you use Windows.


  2. Type python.


  3. Once the interpreter environment responds, type a = 2.


  4. Also, type b = 2.


  5. Type c = a + b.


  6. Now, type c to get the result of the addition. This should give you 4. You can see the example below.


This is an example of what I listed from number 1 to 6 under “Testing Python”:

tiwa@Olaoluwas ~ % python
Python 3.10.2 (main, Mar  1 2022, 17:33:22) [Clang 12.0.5 (clang-1205.0.22.11)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> a = 2
>>> b = 2
>>> c = a + b
>>> c
4
>>> 


Final Thoughts


We're indeed finished with this introduction! I have made sure it is not too technical for a start and what you can call an introduction. I hope you learned that Python is a special kind of language that people use to make computers do cool things. I believe you now understand the nature of this computer language, what Python programming language can be used for, versions of Python, and how to install Python and play additions with it.


In summary, I believe this blog will push you to explore more in the path of software development, which includes all aspects of what Python can be used for, as we explained earlier, such as Web Development.