For students 9th - 12th grade, with at least Algebra I. Do you think
Python is a good first programming language for someone with zero
programming experience? Using Linux and Python for first exposure to
programming languages and principles.
Thank you. 29 1656
On Mar 22, 1:40 pm, jmDesktop <needin4mat...@gmail.comwrote:
For students 9th - 12th grade, with at least Algebra I. Do you think
Python is a good first programming language for someone with zero
programming experience? Using Linux and Python for first exposure to
programming languages and principles.
Thank you.
Yes.
You'll probably get 100 positive answers!
Check out the edu-sig mailing list for discussions on the topic. And
you may want to check out rur-ple.sourceforge.net, where "ple" stands
for "Python Learning Environment".
André
jmDesktop wrote:
For students 9th - 12th grade, with at least Algebra I. Do you think
Python is a good first programming language for someone with zero
programming experience? Using Linux and Python for first exposure to
programming languages and principles.
Linux and Python are a nearly ideal combination for this. Be aware that
at some point, you will likely have to dig into C, the primary language
used to implement both Linux and Python.
jmDesktop <ne***********@gmail.comwrites:
For students 9th - 12th grade, with at least Algebra I. Do you think
Python is a good first programming language for someone with zero
programming experience? Using Linux and Python for first exposure to
programming languages and principles.
I'm not from the US and I'm not sure what 9th/12th grade are, but if
you want to use programming to explore maths, er I mean math, have a
look at the sage project: http://www.sagemath.org/
--
Arnaud
Larry Bates wrote:
jmDesktop wrote:
>For students 9th - 12th grade, with at least Algebra I. Do you think Python is a good first programming language for someone with zero programming experience? Using Linux and Python for first exposure to programming languages and principles.
Thank you.
ABSOLUTELY. Get them started with a REAL programming language that will
teach them proper fundamentals. I wish Python would have been around 25
years ago when I taught incoming Freshmen at local University. To get
students to understand about variable references, etc.
What do you mean by "variable references," and how are they used in Python?
On Mar 22, 3:48 pm, Arnaud Delobelle <arno...@googlemail.comwrote:
jmDesktop <needin4mat...@gmail.comwrites:
For students 9th - 12th grade, with at least Algebra I. Do you think
Python is a good first programming language for someone with zero
programming experience? Using Linux and Python for first exposure to
programming languages and principles.
I'm not from the US and I'm not sure what 9th/12th grade are, but if
you want to use programming to explore maths, er I mean math, have a
look at the sage project:
9th grade roughly corresponds to 3e collège and 10th/12th grade
roughly correspond to the first three years of "le lycée" - although
from my past teaching experience (as a physicist) in French, I have
concluded that mathematics is taught at a higher level in France than
it is in North America - simply looking at the various books available
on given topics. http://www.sagemath.org/
Sage is great. However, I think it is much too advanced for 9th/12th
grade. Furthermore, the OP was looking for suggestion teaching
*programming*, not math.
André
>
--
Arnaud
jmDesktop <ne***********@gmail.comwrites:
For students 9th - 12th grade, with at least Algebra I. Do you think
Python is a good first programming language for someone with zero
programming experience?
It's at least pretty good. It's not ideal, but nothing ever is.
What I mean is: it's the best suggestion I can think of, but I can't
say with confidence that there's nothing better out there.
Alternatives would probably be more esoteric languages like Logo.
Chris Okasaki (of functional data structures fame) has an interesting
blog post about why indentation-based structuring is a big help for
teaching: http://okasaki.blogspot.com/2008/02/...ation-for.html
On Mar 22, 3:34*pm, bsoist <soistm...@gmail.comwrote:
On Mar 22, 12:40 pm, jmDesktop <needin4mat...@gmail.comwrote:
For students 9th - 12th grade, with at least Algebra I. *Do you think
Python is a good first programming language for someone with zero
programming experience? *Using Linux and Python for first exposure to
programming languages and principles.
Thank you.
Absolutely. I love using Python in "the real world" but it is
fantastic for beginning programmers.
Python enforces good habits and presents many opportunities to discuss
programming from an academic perspective. Why does Python not have a
switch or until statement? Why are very common objects (stack, queue,
linked list) not builtin? etc.
Beginning programmers in grades 9-12 are not going to understand
issues like that, and it would be a mistake to try and introduce
them. Beginning programmers should be concentrating their efforts on
learning the syntax of a language and basic constructs like for-loops
and if statements. They will begin by writing simple "hello world"
style programs, and as their basic skills improve, the programs will
get a little more complex and require some more thought and some math
to solve the problems presented to them. String formatting should
probably be introduced to help with formatting the output. That is
about as far as things are going to go.
Terms like "Touring machines" and "lambda-calculus" are not going to
be mentioned anywhere in the course of study.
On Mar 22, 11:40*am, jmDesktop <needin4mat...@gmail.comwrote:
For students 9th - 12th grade, with at least Algebra I. *Do you think
Python is a good first programming language for someone with zero
programming experience? *Using Linux and Python for first exposure to
programming languages and principles.
Thank you.
I absolutely support Python as a first programming language, from 7th
grade on up. Here is a link at the main Python web site that should
give you a number of additional resources: http://www.python.org/community/sigs/current/edu-sig/
-- Paul
On Sat, 22 Mar 2008 21:11:51 -0700, sturlamolden wrote:
On 22 Mar, 23:42, 7stud <bbxx789_0...@yahoo.comwrote:
>Beginning programmers in grades 9-12 are not going to understand issues like that, and it would be a mistake to try and introduce them. Beginning programmers should be concentrating their efforts on learning the syntax of a language and basic constructs like for-loops and if statements.
Yes. And because Python is a "scripting language"
Python is a programming language. It can be used for scripting, but
that's not all it can do. Describing it as a "scripting language" is like
describing a fully-equipped professional kitchen as "a left-over warming
room".
--
Steven
Jeff Schwab <je**@schwabcenter.comwrites:
I've been learning a fair amount about functional programming
recently, mostly because compile-time C++ turns out to be a pure
functional programming language. Where should I go for a solid
grounding in lambda-calculus?
For PL theory in general, try this: http://www.cs.cmu.edu/~rwh/plbook/book.pdf
On Mar 22, 11:29�pm, Steven D'Aprano <st...@REMOVE-THIS-
cybersource.com.auwrote:
On Sat, 22 Mar 2008 21:11:51 -0700, sturlamolden wrote:
On 22 Mar, 23:42, 7stud <bbxx789_0...@yahoo.comwrote:
Beginning programmers in grades 9-12 are not going to understand issues
like that, and it would be a mistake to try and introduce them.
Beginning programmers should be concentrating their efforts on learning
the syntax of a language and basic constructs like for-loops and if
statements.
Yes. And because Python is a "scripting language"
Python is a programming language. It can be used for scripting, but
that's not all it can do. Describing it as a "scripting language" is like
describing a fully-equipped professional kitchen as "a left-over warming
room".
Sure, but then again, some are chefs, others merely
cooks and yet others just warm leftovers.
>
--
Steven
Paul Rubin wrote:
Jeff Schwab <je**@schwabcenter.comwrites:
>I've been learning a fair amount about functional programming recently, mostly because compile-time C++ turns out to be a pure functional programming language. Where should I go for a solid grounding in lambda-calculus?
For PL theory in general, try this:
http://www.cs.cmu.edu/~rwh/plbook/book.pdf
What a mess. That's some professor inventing his very own variation on
predicate calculus and writing a book using his own notation and terminology.
There's no sign of footnotes or references to prior work. The notation
doesn't seem to do anything not previously possible; it's just different.
Back when I was doing program verification work, we used to refer to
stuff like that as the "logic of the month club".
John Nagle
John Nagle <na***@animats.comwrites:
What a mess. That's some professor inventing his very own variation on
predicate calculus and writing a book using his own notation and terminology.
I thought it was all pretty standard. It's the same notation I see in
other PL stuff.
There's no sign of footnotes or references to prior work.
Maybe he'll add that. It's a work in progress.
Back when I was doing program verification work, we used to refer to
stuff like that as the "logic of the month club".
I thought the book was pretty good and I've learned quite a bit from
the parts I've read. Also, the author is one of the big cheeses in
the SML world, if that matters.
On Sat, 22 Mar 2008 23:15:00 -0700, John Nagle wrote:
That's some professor inventing his very own variation on predicate
calculus and writing a book using his own notation and terminology.
There's no sign of footnotes or references to prior work. The notation
doesn't seem to do anything not previously possible; it's just
different.
You say that as if it were unusual in maths circles :)
--
Steven
On Mar 22, 5:40 pm, jmDesktop <needin4mat...@gmail.comwrote:
For students 9th - 12th grade, with at least Algebra I. Do you think
Python is a good first programming language for someone with zero
programming experience? Using Linux and Python for first exposure to
programming languages and principles.
Thank you.
Yes. The nice thing with Python is that you can start off with really
simple examples and slowly build up the complexity along with the
understanding of the students. There's no need to explain OO before
the students can write their first 'Hello, world'.
There's almost no limit to how 'shallow/deep' you can go with Python.
2B
On Mar 23, 8:14*am, Steven D'Aprano <st...@REMOVE-THIS-
cybersource.com.auwrote:
On Sat, 22 Mar 2008 23:15:00 -0700, John Nagle wrote:
That's some professor inventing his very own variation on predicate
calculus and writing a book using his own notation and terminology.
There's no sign of footnotes or references to prior work. *The notation
doesn't seem to do anything not previously possible; it's just
different.
You say that as if it were unusual in maths circles :)
Haha. As opposed to programmers who have all agreed to use the same
language.
Anyway, I have browsed the book and agree with Paul Rubin that there
doesn't seem to be any unusual notation in it, although there are a
numbers of topics that I am not really familiar with.
--
Arnaud
On 2008-03-22, bsoist <so*******@gmail.comwrote:
On Mar 22, 12:40 pm, jmDesktop <needin4mat...@gmail.comwrote:
>For students 9th - 12th grade, with at least Algebra I. Do you think Python is a good first programming language for someone with zero programming experience? Using Linux and Python for first exposure to programming languages and principles.
Thank you.
Absolutely. I love using Python in "the real world" but it is
fantastic for beginning programmers.
Python enforces good habits and presents many opportunities to discuss
programming from an academic perspective. Why does Python not have a
switch or until statement?
Why doesn't it?
Why are very common objects (stack, queue,
linked list) not builtin? etc.
I think I know this one: you just use builtin lists to do stacks, queues
and, er, lists.
On Mar 22, 10:40 am, jmDesktop <needin4mat...@gmail.comwrote:
For students 9th - 12th grade, with at least Algebra I. Do you think
Python is a good first programming language for someone with zero
programming experience? Using Linux and Python for first exposure to
programming languages and principles.
Yes.
Thank you.
You're welcome.
On Sun, 23 Mar 2008 09:24:35 -0700, Aahz wrote:
The problem with lambda is that too often it results in clutter (this is
a strictly made-up example off the top of my head for illustrative
purposes rather than any real code, but I've seen plenty of code similar
at various times):
gui.create_window(origin=(123,456), background=gui.WHITE,
foreground=gui.BLACK, callback=lambda x: x*2)
That means I need to pause reading the create_window() arguments while I
figure out what the lambda means -- and often the lambda is more
complicated than that. Moreover, because the lambda is unnamed, it's
missing a reading cue for its purpose.
And of course this would be so much better:
def double(x): return x*2
gui.create_window(origin=(123,456), background=gui.WHITE,
foreground=gui.BLACK, callback=double)
Not.
The source of the "clutter" (having *less* code is clutter???) and
confusion isn't the lambda, it's the callback.
--
Steven
On Mar 22, 6:40 pm, Jeff Schwab <j...@schwabcenter.comwrote:
jmDesktop wrote:
For students 9th - 12th grade, with at least Algebra I. Do you think
Python is a good first programming language for someone with zero
programming experience? Using Linux and Python for first exposure to
programming languages and principles.
Linux and Python are a nearly ideal combination for this. Be aware that
at some point, you will likely have to dig into C, the primary language
used to implement both Linux and Python.
I've been using Python for five years and now work full-time as a
Python programmer. I've not had to hit C. :-)
Michael Foord http://www.ironpythoninaction.com
On 23 Mrz., 09:31, Arnaud Delobelle <arno...@googlemail.comwrote:
On Mar 23, 8:14 am, Steven D'Aprano <st...@REMOVE-THIS-
cybersource.com.auwrote:
On Sat, 22 Mar 2008 23:15:00 -0700, John Nagle wrote:
That's some professor inventing his very own variation on predicate
calculus and writing a book using his own notation and terminology.
There's no sign of footnotes or references to prior work. The notation
doesn't seem to do anything not previously possible; it's just
different.
You say that as if it were unusual in maths circles :)
Haha. As opposed to programmers who have all agreed to use the same
language.
Anyway, I have browsed the book and agree with Paul Rubin that there
doesn't seem to be any unusual notation in it, although there are a
numbers of topics that I am not really familiar with.
--
Arnaud
The author at least introduces his notation in the initial chapter.
This is good style among mathematicians who introduce conventions at
the beginning of their books or in an appendix.
Note that I'm with Paul here but I'm not sure what John is complaining
about anyway. Maybe sequent calculus ( natural deduction ) which was
introduced by Gentzen around 75 years ago? http://en.wikipedia.org/wiki/Sequent_calculus
Steven D'Aprano <st***@REMOVE-THIS-cybersource.com.auwrote:
On Sun, 23 Mar 2008 13:51:34 -0400, Roy Smith wrote:
On the other hand, when I do:
def torture():
woman.putInChair()
cushion.poke()
rack.turn()
I've also done two things. First, I've created a function object (i.e.
a lambda body), and I've also bound the name torture to that function
object, in much the same way I did with the list. But, it's different.
The function object KNOWS that it's name is torture.
No it does not. Function objects don't know their name. All they know is
that they have a label attached to them that is useful to use as a name
in some contexts, e.g. when printing tracebacks. It's just a label,
nothing more.
I think we're arguing the same thing. When you write
def foo():
whatever
you create an object which contains the string "foo", retrievable through
its __name__ attribute. That's what I meant by "it knows its name"
>What Python give us with lambdas is some half-way thing. It's not a full function, so it's something that people use rarely,
Which people?
which means most people (like me) can't remember the exact syntax.
Speak for yourself, not for "most people".
Well, OK. When I said, "most people", I really meant "I know about me, and
I'm guessing about other people". I still think it's a fair statement that
if you look any large collection of Python code, you will find many more
uses of def than of lambda.
Even when I know
it's the right thing to be using in a situation, I tend not to use it
simply because the path of least resistance is to write a one-off
function vs. looking up the exact syntax for a lambda in the manual.
lambda arguments : expression
Why is that harder to remember than this?
def name ( arguments ) :
block
because I remember things I use often, better than I remember things I use
infrequently.
On Sun, 23 Mar 2008 22:36:35 -0400, Roy Smith wrote:
I've also done two things. First, I've created a function object
(i.e. a lambda body), and I've also bound the name torture to that
function object, in much the same way I did with the list. But, it's
different. The function object KNOWS that it's name is torture.
No it does not. Function objects don't know their name. All they know is that they have a label attached to them that is useful to use as a name in some contexts, e.g. when printing tracebacks. It's just a label, nothing more.
I think we're arguing the same thing. When you write
def foo():
whatever
you create an object which contains the string "foo", retrievable
through its __name__ attribute. That's what I meant by "it knows its
name"
But that's not true. Firstly, you can't access the __name__ attribute
unless you already have a reference to the object (not necessarily a
name), so clearly the __name__ attribute isn't how you retrieve objects.
Secondly, the __name__ attribute has no special purpose. It's not even
used for tracebacks.
>>def foo():
.... return "result"
....
>>foo.__name__ = "something" something()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'something' is not defined
>>> something = foo something()
'result'
>>something(None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: foo() takes no arguments (1 given)
>>something.__name__
'something'
--
Steven
On Mon, 24 Mar 2008 04:33:53 -0400, Terry Reedy wrote:
The fact that .func_name (which is writeable) is not used at first
surprised me until I remembered that code objects can potentially be
used by multiple function objects and hence are not connected to any one
in particular.
How does that happen?
And if it is the case, what's the justification for giving them a co_name
attribute? Surely the name of the function should be that of the function
object, not of one of the shared parts?
--
Steven
On Mar 24, 1:26*pm, Steven D'Aprano <st...@REMOVE-THIS-
cybersource.com.auwrote:
On Mon, 24 Mar 2008 04:33:53 -0400, Terry Reedy wrote:
The fact that .func_name (which is writeable) is not used at first
surprised me until I remembered that code objects can potentially be
used by multiple function objects and hence are not connected to any one
in particular.
How does that happen?
Like this:
>>def foomaker(x):
... def foo(y): return x+y
... return foo
...
>>foo1 = foomaker(1) foo2 = foomaker(2) foo1.func_code
<code object foo at 0x73530, file "<stdin>", line 2>
>>foo2.func_code
<code object foo at 0x73530, file "<stdin>", line 2>
Of course foo1 and foo2 are not the same thing:
>>foo1(8)
9
>>foo2(8)
10
And if it is the case, what's the justification for giving them a co_name
attribute? Surely the name of the function should be that of the function
object, not of one of the shared parts?
>>foo1.__name__
'foo'
>>foo1.func_code.co_name
'foo'
As seen above, func.__name__ and func.func_code.co_name are the same
thing (until tampered with).
--
Arnaud
On Mon, 24 Mar 2008 06:48:10 -0700, Arnaud Delobelle wrote:
On Mar 24, 1:26Â*pm, Steven D'Aprano <st...@REMOVE-THIS-
cybersource.com.auwrote:
>On Mon, 24 Mar 2008 04:33:53 -0400, Terry Reedy wrote:
The fact that .func_name (which is writeable) is not used at first
surprised me until I remembered that code objects can potentially be
used by multiple function objects and hence are not connected to any
one in particular.
How does that happen?
Like this:
>>>def foomaker(x):
... def foo(y): return x+y
... return foo
...
>>>foo1 = foomaker(1) foo2 = foomaker(2) foo1.func_code
<code object foo at 0x73530, file "<stdin>", line 2>
>>>foo2.func_code
<code object foo at 0x73530, file "<stdin>", line 2>
Ah, that makes sense. And obvious in hindsight.
Of course foo1 and foo2 are not the same thing:
Naturally not. They are different functions. The fact that they share a
small part (func_code) is irrelevant. There's more to a function than the
code object.
>And if it is the case, what's the justification for giving them a co_name attribute? Surely the name of the function should be that of the function object, not of one of the shared parts?
>>>foo1.__name__
'foo'
>>>foo1.func_code.co_name
'foo'
As seen above, func.__name__ and func.func_code.co_name are the same
thing (until tampered with).
Yes, but what I'm asking is why the code objects have a co_name
attribute. And even if there's a good reason for code objects to have a
name, why do tracebacks use func.func_code.co_name instead of
func.__name__?
--
Steven
On Mar 24, 2:01*pm, Steven D'Aprano <st...@REMOVE-THIS-
cybersource.com.auwrote:
[...]
>
Yes, but what I'm asking is why the code objects have a co_name
attribute. And even if there's a good reason for code objects to have a
name, why do tracebacks use func.func_code.co_name instead of
func.__name__?
From what I remember when I looked at the source: stack frames execute
code objects, not functions. They don't know what function has
spawned them, only what code object they are executing. In fact when
one thinks of it, it makes more sense for code objects to have a name
(taken from the def statement) than for function objects, as there is
exactly one code object for every def statement.
--
Arnaud
"Arnaud Delobelle" <ar*****@googlemail.comwrote in message
news:ce**********************************@c19g2000 prf.googlegroups.com...
>From what I remember when I looked at the source: stack frames execute
code objects, not functions. They don't know what function has
spawned them, only what code object they are executing. In fact when
one thinks of it, it makes more sense for code objects to have a name
(taken from the def statement) than for function objects, as there is
exactly one code object for every def statement.
This is what I tried to say before. Function objects have the attributes
needed to call the code. Code objects have attributes needed to execute
the code. Both have a name for str() and repr().
tjr
On Sun, Mar 23, 2008 at 4:29 AM, Steven D'Aprano
<st***@remove-this-cybersource.com.auwrote:
Python is a programming language. It can be used for scripting, but
that's not all it can do. Describing it as a "scripting language" is like
describing a fully-equipped professional kitchen as "a left-over warming
room".
+1 QOTW.
--
Cheers,
Simon B. si***@brunningonline.net http://www.brunningonline.net/simon/blog/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Brandon J. Van Every |
last post by:
What's better about Ruby than Python? I'm sure there's something. What is
it?
This is not a troll. I'm language shopping and I want people's answers. I
don't know beans about Ruby or have...
|
by: Stephen C. Waterbury |
last post by:
This seems like it ought to work, according to the
description of reduce(), but it doesn't. Is this
a bug, or am I missing something?
Python 2.3.2 (#1, Oct 20 2003, 01:04:35)
on linux2
Type...
|
by: Ville Vainio |
last post by:
I don't know if you have seen this before, but here goes:
http://text.userlinux.com/white_paper.html
There is a jab at Python, though, mentioning that Ruby is more
"refined".
--
Ville...
|
by: Lad |
last post by:
Is anyone capable of providing Python advantages over PHP if there are
any?
Cheers,
L.
|
by: beliavsky |
last post by:
Linux Journal annually polls its readers on questions such as their
favorite programming language. In the 2005 poll, Python is 2nd, its
highest ranking ever. Below are the results by year. I wish...
|
by: Mark Tarver |
last post by:
How do you compare Python to Lisp? What specific advantages do you
think that one has over the other?
Note I'm not a Python person and I have no axes to grind here. This is
just a question for...
|
by: Enteng |
last post by:
Hi I'm thinking about learning C as my first programming language.
Would you recommend it?
Also how do you suggest that I learn it?What books/tutorials should I
read for someone like me?
Thanks...
|
by: WaterWalk |
last post by:
I've just read an article "Building Robust System" by Gerald Jay
Sussman. The article is here:
http://swiss.csail.mit.edu/classes/symbolic/spring07/readings/robust-systems.pdf
In it there is a...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |