Understanding python your baby steps
By: Richard Okonicha
Tags: Beginner, Baby, Python, Learning, Programming

To understand what python is, you first need to understand what a programming language is.

………………………………………….

So, What is PROGRAMMING?

Programming is the art and science of translating a set of ideas into a program

a list of instructions a computer can follow.

By definition

But I perceive it quite differently.

…………………………………………

You see, the computer is a very dumb machine, much like a little child if you may.

When you want a child to do something for you, you have to be able to simplify the task to be as easy as possible, so it won’t be misunderstood.

So let’s assume you wanted your little brother (junior), who just learned to walk, to go to the door and bring you a ball.

You would give him instructions, step by step that he would follow. It may look like this

>> junior

>>Go to the door

>>And Pick that ball

>>And bring it back to me

So let’s assume your computer had legs and hands, and you wanted it to go and pick a ball for you.

The program would look like this;

>>Computer

>>Move forward

>>Stop

>>Pick up the ball

>>Return

And that is basically what a computer program would look like.

But what if the computer/robot doesn’t understand the English language? It won’t understand a thing I just told him.

Say it was a french robot, I would have to speak French for it to understand me.

So let’s try that again

>>ordinateur

>>Avance

>>Arrêtez

>>ramasser la balle

>>revenir

If you don’t speak French like me that would look completely stupid and unintuitive to you.

…………………………………..

If you noticed, the commands were divided into steps. Small chunks of steps put together to perform a particular task. And that task is “bringing me the ball”

……………………………………..

So let’s now say there is someone sitting next to you who doesn’t know how to ask a child to go and pick the ball.

You can just write down the instructions you told the little boy and ask the person sitting beside you to read it.

As soon as he finishes reading it, junior walks to the door and picks up the ball.

So now you get the gist.

I can write down some set of instructions and give to another computer to carry out the same task.

……………………………………

Alright, we are getting there.

Let’s now say junior only understand french.

And I didn’t speak French only English.

I could get a translation/interpreter so that when I give junior an instruction the interpreter would translate what I have just said into french. So junior can understand me.

…………………………………..

So if we had a computer that only speaks mandarin we would need a translator that can convert my English into mandarin.

But hey!!! Computers don’t speak English or french or mandarin. They only understand one language. And that is binary

But binary is just 1s and 0s and looks even more stupid than a french command would.

And binary is extremely difficult to learn, and just like french or any language, we would need a translator for that, wouldn’t we?

But of course, we can’t buy a human being to come and talk to the computer anytime we want something done, so instead someone wrote a set of instructions (program) that would understand a language that is very similar to English(programming language) and also understand binary.

So that when we give it a set of commands like we gave junior, it would translate those commands into Binary(i.e 1s and 0s) that the computer can understand.

So this person wrote the whole program to do this and named that program “python”

………………………………..

So yes programming languages are very similar to English. Let me show you an example

let’s say I wanted my computer to display my name on the screen.

I would have to somehow write it in binary for the computer to understand what I want.

Or

I could tell python to tell my computer what I want.

But I also need to say it in such a way that python itself would understand what I want. And that is easy

The instruction would look like this

>>Python

>>Print (“Richie is my hero”)

…….the end

Notice the first line was me calling python like I called junior in the first instance.

And the second line was me telling python to print something out.

yes, python thinks print means display, stupid

right!!!

So after telling it to display I had to specify what exactly do I want to display!!

So I put what I wanted to display in quotation “”

“Richie is my hero”

And as soon as I press enter I would see the computer displaying exactly that

…………………………………………………

So we see here that python is actually just English but a weird kind of English.

Not too different from pidgin

So we will be learning a special kind of pidgin called “PYTHON”

!!