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
#1
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?

Mark
Quote
#2
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 program.py), go to the command line, navigate to the folder with the file, and type python program.py 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 - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures

Quote
#3
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?

Mark
Quote
#4
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
Quote
#5
Thanks for taking the time with your explanation. It really helps.

Mark
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  General Algorithm for data anlysis triluan 2 134 Mar-13-2019, 09:38 PM
Last Post: micseydel
  Question about exporting Python Nwb 6 367 Jan-15-2019, 05:56 AM
Last Post: Nwb
  I need simple help with python? Pr1sl1 7 317 Dec-14-2018, 09:06 PM
Last Post: ichabod801
  which code works? Skaperen 4 613 Jun-15-2018, 04:18 AM
Last Post: Skaperen
  Any interesting works in progress? mpd 5 957 Dec-15-2017, 09:34 PM
Last Post: wavic
  I'm New to Python and have a question steveharcus 2 644 Dec-15-2017, 02:38 PM
Last Post: sparkz_alot
  Can't understand how it works wavic 3 1,561 Dec-08-2017, 05:12 PM
Last Post: Larz60+
  General questions PappaBear 9 2,183 Apr-11-2017, 10:01 PM
Last Post: Larz60+

Forum Jump:


Users browsing this thread: 1 Guest(s)