Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 A very simple, general question of the big picture of how python works
I will be starting to learn Python once I settle on a really good beginner text & free online beginner 'class' (that's not constantly asking you to upgrade to the paid version).

Before that, considering how I best learn, I need to get a mental image of how Python works. How do you get from a blank screen + strings, variables, loops, and ... to an executable program?

Can someone point me in the direction of several paragraphs or a video or a flowchart that will provide the kind of big picture, overview, put all the pieces together explanation?

I'm not sure what you're asking. To run a python program you pretty much just run it. Save your code in a file with a .py extension (like, go to the command line, navigate to the folder with the file, and type python into the command line. Many IDE's also have ways you can run the program you are working on without opening a command line window.
Craig "Ichabod" O'Brien -
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures

Here's an analogy of sorts that might help get my point across.

Any Python program running vs. A human running.

To experience the human running, you first must 'learn human'. I get a book. Chapter 1 is the foot, chapter 2 is hair, chapter 3 is the stomach. I'm now 3 weeks into learning 'human' and I no clue what this 'human' thing and more importantly how these parts that I've read about in 1,2 and 3 fit together in some way that ends up as a human, then a human running. Then someone gives me a book with the schematic of the entire human body, inside and out. Then I get a video that shows the human walking. Now I get what the foot in chapter 1 is about, how it fits, what it does and why...

Now take me and Python (and for this analogy Python could be any coding software). I get a book. Chapter 1 is strings, chapter 2 is loops, chapter 3 is.... I'm at the same place I was with the human and chapters 1-3 UNTIL I saw the entire body.

Am I making any more sense now?

One way of looking at it:

Python is programming language. Language is not just randomly here. In order to speak/write in any language you need to know language and its rules (verbs, nouns, names, punctuations, tenses etc, etc). But this is not enough. There must be also something you want to express, otherwise your knowledge of language is useless.

You could approach learning Python as learning spoken language. There are parallel processes of learning vocabulary and learning how to use this vocabulary to express what you want to say.

Python is pretty special as it's very easy to translate from spoken language:

'give me all numbers in this list which are dividable by 3' --> (x for x in this_list if x % 3 == 0)

First comes what you want to express in spoken language and then comes how to express it in Python. There can't be how without what.

Python creator Guido van Rossum put it this way in his King's Day Speech:

Quote:Typically when you ask a programmer to explain to a lay person what a programming language is, they will say that it is how you tell a computer what to do. But if that was all, why would they be so passionate about programming languages when they talk among themselves?

In reality, programming languages are how programmers express and communicate ideas — and the audience for those ideas is other programmers, not computers. The reason: the computer can take care of itself, but programmers are always working with other programmers, and poorly communicated ideas can cause expensive flops. In fact, ideas expressed in a programming language also often reach the end users of the program — people who will never read or even know about the program, but who nevertheless are affected by it.
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Thanks for taking the time with your explanation. It really helps.


Top Page

Forum Jump:

Users browsing this thread: 1 Guest(s)