Posts tagged python
Python for Newbies – Tutorial – Part Two
Dec 9th
This is part two of the Python for Newbies tutorial . Part One can be found here. The content of this tutorial is provided under the Creative Commons Attribution-Share Alike 3.0 license:
http://creativecommons.org/licenses/by-sa/3.0/
http://creativecommons.org/licenses/by-sa/3.0/legalcode
Functions
Functions are simply a set of commands or statements grouped together as a unit with a name that can be called on by other parts of the program (or even by other programs) to accomplish a certain task. Since the statements inside a function do not have to be rewritten every time the steps they perform are needed, our programs are smaller and easier to maintain. We have already used several functions that are built in to the Python core. For example, we have used the del function to delete items from Python lists and dictionaries, the tuple function to convert a string into a tuple, several math functions, and others. However, we are now going to learn how to create our own functions. Functions are simple, but there are a few new associated concepts that you will have to understand. Read the rest of this entry »
Popularity: 34%
Python for Newbies – Tutorial
Dec 9th
This is a Python tutorial that tries to touch on most areas of the Python language, but attempts to be very simple so that people who have never done any sort of programming can grasp it. Special attention will be given to its use as a Maemo OS development platform. The content of this tutorial is provided under the Creative Commons Attribution-Share Alike 3.0 license:
http://creativecommons.org/licenses/by-sa/3.0/
http://creativecommons.org/licenses/by-sa/3.0/legalcode
The versions of Python and other libraries targeted by the tutorial will be initially the ones available on Maemo 5 at the time of the N900 release. That means Python 2.5.4. As Maemo starts moving to more recent versions of Python we will attempt to keep this tutorial in sync.
If you have any other comments or suggestions please let me know. We have a Google Wave available for those that would like to contribute to the content.
Due to its length, we have divided the tutorial in two parts (maybe three by the time we are done). There are a few sections still missing at the end of the tutorial. We hope to add them in the near future. But, again, if someone would like to help, let us know.
Table of Contents
Part One
- What is Python?
- Why Python?
- Installing Python
- How Python works
- The building blocks of a Python program
- How to program in Python
- Functions
- Modules
- Working with files
- Classes and Objects
- Errors and Error Handling
- Other common built-in functions
- Time
Part Two
Read the rest of this entry »
Popularity: 92%
Python for Newbies – Tutorial
Recent Comments