[Tutor] Hello Python Tutor - help please!

Steven D'Aprano steve at pearwood.info
Wed Aug 22 16:51:41 CEST 2012


Hello Cecilia,

My replies are below, interleaved with your comments, which are
prefixed with > marks.


On 22/08/12 20:10, Cecilia Chavana-Bryant wrote:

> By the way, the 3 weeks I spent trying to learn C really ended up
> being spent trying to get to grips with using a terminal for the
>first time in my life.

Unfortunately, there will be a certain amount of that, or at least
something quite similar to a terminal. Fortunately, using Python in
the terminal is usually MUCH easier than C, and in my experience
using Python's interactive interpreter is one of the best ways to
learn the language.

What sort of computer are you using? Windows, Linux, Macintosh, or
something different? I think that most of the people here use Linux
or Windows, but we can probably help you one way or the other.


> Since getting back to work, I was advised to try learning Python
>instead of C as it is a much easier first language to learn.

Yes, definitely, but it is still programming. Don't overestimate
the difficulty, if it was hard programmers couldn't learn to do it
*wink*, but on the other hand it's not trivial either.


> I have been trying, but again, to not great success. I started
>following "A Primer on Scientific programming with Python" but I
> kept getting lost and stuck, specially on the exercises.

If you are willing to make a good, honest effort on the exercises
first, we're happy to help you with them. We do like to see your
attempt first, so that we can suggest fixes rather than solve the
problem for you.


> I have also been advised that I should not try to learn
> programming by following guides but by trying to write the
> programmes I need to analyse my data. Although I can understand
> the logic behind this last bit of advise (it gives context and
> direction to the learning process) I have also gotten stuck
>trying this approach as "I do not know how to programme!".

I'm entirely with you there. Having direction in your learning is
a good thing. But until you understand the basic skills you need,
it will be nothing but frustration and pain!

I recommend that, if nothing else, you work through some basic
tutorials so that you at least have some idea of basic language
constructs like:

- strings
- lists
- functions
- ints
- floats
- basic arithmetic
- importing modules
etc.

You could start with the official Python tutorial:

http://docs.python.org/tutorial/index.html

although I find that it is sometimes a bit wordy. (I should
talk...)

If you get stuck, don't hesitate to come back and ask
questions, that's why we're here.


> Thus, I was hoping that some of you can remember how you got
>started

I learned from the book "Learning Python" by Mark Lutz and
David Ascher, and then by writing oodles and oodles of really
bad code which I have long since thrown away :)


[...]
> So, I am now feeling VERY frustrated and have no idea what on
>Earth I am doing! Can anyone please offer guidance in my
>learning process?

I feel your pain! That's how I feel every time I try to understand
monads in Haskell (don't ask!).

How about if you start off with a simple question you would like
to solve using Python? Something relevant to your work. You may
need to explain some of the concepts to us, since we're not
ecologists. (At least, I'm not, I can't speak for others.)

We can then try to guide you to a solution and introduce concepts
as we go.




-- 
Steven


More information about the Tutor mailing list