1

I've recently installed ubuntu 12.04 on my oldie ThinkPad, along with Python-interpreter idle and obviously Python.

I'm looking to learn the basics of this programming language, but I've had no luck finding a conclusive beginners guide for the most recent Python that doesn't require knowledge of previous coding language.

I know how to use the GUI and use terminal for installation or basic tasks, and I have a basic knowledge of BASIC (goto, print, input, if, next, etc.) But absolutely no knowledge of Python or any other coding.

If someone could briefly explain or point me in the right direction to a guide, that would be great!

Also, if anyone can recommend a better language to start off with for a beginner, I would be very interested. However, from what I've researched it seems Python is the most supported cross-platform and in general?

Thanks in advance.

3

2 Answers 2

5

When I started python I followed the official documentation, but it seemed too complicated for me at the time.

The way I really started to learn python was using it all the time. Here where I work, I had to backup some files, this was my first official project with python, it took me about a week to finish it. I had to search on google each time I had a problem, but after some time, you get used to the overall language syntax.

I really recommend you start learning python first, I started learning programming using C, it was hard and I couldn't understand much of it, if I had started with python, my life would be a lot easier. The reason for this is that python is interpreted, the errors are much more readable, for a begginner:

Example of the classic Hello World in python:

 print "Hello, World!" 

Now the same program in the C++ language:

#include <iostream>

int main()
{
   std::cout << "Hello, World!" << std::endl;
   return 0;
}

At the time, I had many questions when I saw this and I was too terrified to start programming in C++, if I had started with python or C#, I wouldn't be that scarified of learning a new language.

1
  • Many thanks for your insight, very helpful! I was already a little bit scared of Python, C++ is terrifying!
    – Nilo
    Nov 10, 2012 at 19:27
2

Go for Python !!
The approach which I think would be a good for learning it:

  1. Start with: http://docs.python.org/2/tutorial/ . The tutorial'll get you started.
  2. Once you feel comfortable and want to learn more python, start looking at library reference section of docs.python.org website.
  3. With this you can go for reading code for the libraries present already in the directory /usr/lib/pythonX where X is the version of python you have on your machine. Reading the functions present in these files would familiarize you with the style and conventions you could use to write standard python code and other tricks-n-treats too.
  4. If you don't want to learn the language too deeply, you could skip step 3 and just start writing some application in python. In essence, just start practising rather than reading standard code. But this is a hard way to learn things.. But that's just my opinion.

In summary, Follow docs.python.org website's tutorial for starting. Then go for other text present on this website. You can read the code present in standard library while referring the website to learn the style you could write python in.

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.