Python in Summary
|Requirements||Local installation required on any modern computer.|
|Cost||Many learning resources are free but there are also paid alternatives.|
|Independence Level||Children can work through some material independently after the initial set up.|
|Target||Beginner / ages 9 & up|
|Outcomes||Write fully functional computer programs that do stuff.|
|Resources||The two books that we used essentially cover the same topics, so only one would suffice. IrishCyborg preferred the Python for kids book for which there is an earlier version available for free download here
The Python programming language was created in 1991. It is named after the Monty Python’s Flying Circus TV show, not the snake. Python is a fully formed grown up language that is widely used by many of the top companies around today. Google were so much enamoured by it that they hired the language’s creator Guido van Rossum. Not only did he invent the Python language but also is credited with the origination of the phrase Benevolent Dictator For Life for his role within the Python community.
If your child has had some background programming experience, then I would suggest that you follow a similar approach to us. Buy the Python for Kids book (or download the free earlier version), get the software installed on your computer and let them follow the book for themselves. Be prepared to help them out with explaining what is written in the book, but rest assured that it is an easy read. The ability to follow along with a book to learn a new skill is an essential life skill in itself.
What is good about Python?
- Python has a large collection of available libraries. By library I don’t mean a building with loads of books and people that say ssshhh! In computer science parlance a library is a collection of pre-written code that can be reused for specific purposes. In Python a library is also commonly called a package or module, there are differences between these terms but for the beginner they can be considered the same. As an example, if you were writing a program which required very specific numeric measurements with a high degree of accuracy then you would use the NumPy library. Using a library saves you from having to write that code capability yourself. Of course most beginners won’t need to care about having a fraction accurate to the squillionth decimal place but they may be impressed with what can be done with the “drawing-stuff-happening-on-screen” library called TkInter.
- Another benefit with python is that it comes with an interactive console. Having this means that the student can play with code as they write, like having a scratch pad for ideas beside a typewriter. With the console you can type stuff in and see what happens. If it has the desired effect you can copy it out to a file which becomes your Python program.
- The type system is dynamic. The type system is what defines all of the objects (variables, functions or modules) in a language. When a programming language uses dynamic typing, it will auto determine the ‘type’ for you from the context. The opposite of dynamic typing is static typing. This concept is best explained with an example; suppose I ask you if you prefer an apple or an orange? You would know from the context that the types of object I am referring to are both fruit. You can infer the types from the context of the question by taking both possible answers into account and inferring what type of objects make them comparable. If I were to ask if you think apple makes good hardware then you know from the context that I am not referring to the fruit. Some programming languages make you define the type of a variable before using it in your program, this is a more formal way to program and is referred to as static typing. This formality can be counter-intuitive to the beginner, but there are also some very good reasons for using a static typed language. Python is one of the languages that will try to infer the type from the context, hence it is a dynamically typed language.
Our Children’s take on Python
Other Resources for Learning Python
LearnPython has an interactive console in your browser for you to type code into. This may not suit younger kids.
Google offer a developer’s Python Class here complete with video lectures and content to read and follow at your own pace. It is a college lecture type format so more suited to slightly older kids.
Coursera has a beginner Python course available here. The structure of Coursera makes it more suitable to teens’n’older learners.
If you are an adult wishing to learn python yourself (just so you can keep up with your children’s vocabulary) I would suggest you start with the people who maintaining the language: python.org. They have a assembled a list of beginner tutorials for you to follow at your own pace here.
Other Posts in the ‘Kids that Code’ series.