Re: Resources for education (was Re: Operating systems at war?)
- From: Wolfgang Grafen <wolfgang.grafen@xxxxxxxxxxxx>
- Date: Wed, 07 May 2008 19:47:22 +0200
Chika schrieb:
In article <fvsel6$mgq$1@xxxxxxxxxxxxxxxxxxxxxx>, Wolfgang GrafenYou leave me somehow puzzled. My impression of Python is that it is at least as easy as BASIC and hides all advanced features completely from a beginner. Agreed, for a complete knowledge of all features you will have to learn more, but for all what Basic offers Python should be more both to learn and write.
<wolfgang.grafen@xxxxxxxxxxxx> wrote:
Chika schrieb:
In BASIC, the use of structure is often more a matter of self controlWhat is wrong with Python? IMO it is much more easy to learn and apply
rather than imposed syntax, which is what you have in C/C++/Python and
many other languages of the type but, as I found out many years ago
when I first started learning my craft using Pascal, structured
programming in a language in which structure is a requirement can be
difficult to pick up.
John might be underestimating the youth of today as far as that goes,
but I agree that BASIC is certainly easier to learn (and to teach).
BBC BASIC does go some way to address this, but it suffers just as
badly since the structure it is capable of can simply be ignored.
than Basic and most if not all other languages.
There's nothing wrong with Python. As a structured language, it does its
job. Read back what I said, however. I said that it wasn't as easy to
teach as something like BASIC, and I stand by that. That doesn't mean that
there is anything wrong with it.
When it comes to efficiency BBC basic and integrated assembler on RiscOS
probably beats Python, but as a general language AND for studying
advanced programming techniques like object oriented programming it is
hard to beat Python. To learn Python basics is only a matter of days
btw.
But that's the point. "Advanced programming techniques" implies that the
student already has some knowledge of programming. Try and explain OO
structure to a newb and all you will get is blank mode.
BASIC's biggest strength is that you can teach it to pretty much anybody
regardless of prior study, which is why it has been used in a number of
situations (for example, it found niches in the television industry purely
because it was easy for any amateur to write something useful). It's
strength, however, is also its weakness as I explained before, which is
why, ultimately, BASIC is not as efficient as a language such as Python,
or any of the other named languages for that matter.
There is no Python dialect, once available it will run on all
operating systems with the same command set and most libraries. For self
education my best advice is learn Python, is is doable even for a child.
And there are a lot of reasons for this, the most important are - you
become much more efficient - debugging is a piece of cake - you can use
Python also in a professional environment - there are a lot of libraries
available for free etc
The problem is that you are almost certainly writing from the POV of
somebody with programming experience. Once you understand the principles
of programming, it is relatively easy to switch into any given language
but teaching somebody with no programming background isn't so easy.
In Python
- you don't have to declare variables in advance
- There are no goto statements
- There are no global variables unless you declare them
- immediate feedback through interactive Python shell
- live evaluation of your program status and objects without need of a debugger (but there are free debuggers for Python)
- Only one Python language, no dialects or commercially modified syntaxes
A oneliner:
-----------
print "hello"
A calculation:
--------------
print 12*3
A function call:
----------------
def my_function(a, b):
print a*b
print my_function(12, 3)
or
print my_function(b=3, a=12)
Working with a dictionary:
my_dictionary = {
"car" : "Auto",
"bicycle" : "Fahrrad"
}
print "'Auto' translated to English is %s" % my_dictionary["car"]
print my_dictionary
for element in my_dictionary:
print element
Working with an array:
----------------------
my_array=[2, 'hello', my_function, my_dictionary]
print my_array
for element in my_array:
print element
FileIO:
-------
to write:
fp = open("myfile.txt", 'w')
to read:
fp = open("myfile.txt")
I think these few lines cover the Basic syntax as far I remember but I have to admit I only had very little experience with Basic. I already introduced the dictionary where I believe there is no equivalent in basic BASIC. You can do a lot with the statements above, it is almost all you have to know. FileIO is more easy than most other languages and a lot more easy than Basic.
I am very sure, Python is significant more easy than Basic for the same features (limited by Basic), and once you need you will have the complete toolbox somebody can expect from an advanced and modern language. It is also possible to program interactively in the python shell and get back immediate response, extremely helpful for beginners.
Just give Python a chance, it is really very very easy and very suitable for all kinds of beginners, from kid to professionals.
Best regards
Wolfgang
.
- Follow-Ups:
- Re: Resources for education (was Re: Operating systems at war?)
- From: John M Ward
- Re: Resources for education (was Re: Operating systems at war?)
- References:
- Re: Resources for education (was Re: Operating systems at war?)
- From: John Cartmell
- Re: Resources for education (was Re: Operating systems at war?)
- From: David Boddie
- Re: Resources for education (was Re: Operating systems at war?)
- From: Chika
- Re: Resources for education (was Re: Operating systems at war?)
- From: Wolfgang Grafen
- Re: Resources for education (was Re: Operating systems at war?)
- From: Chika
- Re: Resources for education (was Re: Operating systems at war?)
- Prev by Date: Re: Resources for education (was Re: Operating systems at war?)
- Next by Date: Re: Resources for education (was Re: Operating systems at war?)
- Previous by thread: Re: Resources for education (was Re: Operating systems at war?)
- Next by thread: Re: Resources for education (was Re: Operating systems at war?)
- Index(es):
Relevant Pages
|