TEACHING PYTHON TO SCHOOL KIDS

rushabh meha python workshop

(Rushabh leads a software product company that publishes a free and open source web based ERP for small and medium businesses – ERPNext. They have built the product from scratch and the product is being used actively by many businesses across the world.)

 

 

 

“Call of Duty”, “GTA Vice City”, “Minecraft”, “Candy Crush” the kids were shouting when I asked them what were their favorite computer games. What else did they do with their computers? I asked, “Download movies on torrents” someone shouted.

This was a group of 30 kids of age 12–14 that were attending a session introduction to computer programming I was a part of, at my daughter’s school, Shishuvan. The school had decided to start a computer club and a bunch of volunteers including me, had happily agreed to teach some Python programming to kids. Having learned programming at the age of 11, I knew they should be able to grasp the basic concepts.

After the warm up, we quickly fired up the Python shell.

Let’s Talk

“I am going to teach you how to speak to a computer. We talk to each other in English, but we will talk to the computer in a language called Python. Don’t worry, it is like English and its going to be real easy”. Having done this kind of session before, I knew that not using computer jargon and throwing the kids directly into code works really well.

“Lets find out how smart the computer is. Lets find out if it knows how to calculate”, I asked. We started with basic arithmetic, addition, multiplication and division.

>>> 2+2
4
>>> 5 * 20
100
>>> 10 / 3
3

“That is wrong”, the kids immediately shouted.

Then I said, lets try this:

>>> 10.0 / 3
3.33333333335

That’s how we got introduced to Decimals.

Python is like English

Some kids were already trying things on their own. Since I had told them that Python was like English they were already typing things like

>>> who is sachin tendulkar
>>> what is my name

“The computer is not so smart yet, we will have to teach it”.

It was amazing to see how quickly the kids were trying to gauge the smartnessof the computer!

Then quickly we got down to calculating a percentage and I quietly introduced variables

>>> my_marks / total_marks * 100

They were tagging along quite well.

Teaching the Computer

Then I became too ambitious. “Watch this”, I said

>>> def what_is_my_percent(my_marks, total_marks):
      return my_marks / total_marks * 100
>>> what_is_my_percent(273.0, 300)
91.0

“Since the computer is not so smart, we will have to teach the computer a few definitions. The way to define something to a computer in Python is by usingdef”, I told them.

Immediately there was a commotion. “What is this colon?”, “What is def?” they were shouting. I felt that I had tripped. Water was drying from my mouth. In a moment of horror, I realized that, with that one example, I had introduced too many things

The kids were all up in arms, all of us volunteers were walking from table to table, explaining the eager queries everyone was having.

Thankfully after ten minutes or so we recovered, and the kids were beginning to understand. They had discovered they could teach the computer to calculate formulas. Someone even used the word “function”. Soon, they were experimenting with new functions to calculate areas, adding numbers and more. We also did a bit of lists before we decided to call it a day.

At the end of the session we could see that the kids where excited learn about programming and some of them were ready to do a lot more. The way they were modifying the instructions we taught them, and changing the context of the examples, showed that they had already grasped a lot of concepts. They were ready to dive into classes and objects next.

Concluding Thoughts

I had a lot of fun teaching Python and the energy was great. At the end of a couple of hours of shouting, I was refreshed! A diverse group of volunteers came together to make this happen, including alumni, teachers, parents and administrators. This is only the first step of what we hope is a long journey. Over the next few sessions, we are hoping to teach the kids web programming, databases and the ability to build whole applications that will help run the school.

It is very heartening to know that the school was willing to let kids learn computers in a non traditional way. The can-do spirit of Shishuvan was amazing. Standardized and structured education has been the foundation of the modern society but as technology is breaking down barriers, education is changing too. It was thrilling to be a part of this change.

This was made possible due to the openness and vision of the Shishuvan community, specially Lincoln, Neha, Premjibhai and Sarita. Alumni Darshan and Raj have been very diligent and the ideal bridge. There was great support from fellow parents Parul and Uma. Special thanks to Anand for volunteering to help me conduct the session. We have just gotten started, watch out for further updates

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>