Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #61600

Re: Experiences/guidance on teaching Python as a first programming language

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'output': 0.05; 'subject:Python': 0.06; 'explicit': 0.07; 'string': 0.09; 'executed': 0.09; 'subject:language': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'creates': 0.14; 'language.': 0.14; '"hello': 0.16; '3:27': 0.16; 'footnote': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'handlers': 0.16; 'repl': 0.16; 'subject:programming': 0.16; 'world!': 0.16; 'world!")': 0.16; 'language': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'command': 0.22; '>>>': 0.22; 'programming': 0.22; 'cc:addr:python.org': 0.22; 'print': 0.22; 'creating': 0.23; 'cc:2**0': 0.24; "i've": 0.25; 'first,': 0.26; 'second': 0.26; 'subject:/': 0.26; 'header:In-Reply-To:1': 0.27; 'function': 0.29; '[1]': 0.29; 'am,': 0.29; 'dec': 0.30; 'message- id:@mail.gmail.com': 0.30; 'lines': 0.31; 'produces': 0.31; 'languages': 0.32; 'another': 0.32; 'quite': 0.32; 'text': 0.33; '(including': 0.33; 'style': 0.33; "i'd": 0.34; 'could': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'programming,': 0.36; 'rather': 0.38; 'anything': 0.39; '12,': 0.39; 'how': 0.40; 'even': 0.60; 'commands': 0.60; 'world.': 0.61; 'skip:* 10': 0.61; 'teaching': 0.64; 'more': 0.64; 'teach': 0.65; 'felt': 0.74; 'as:': 0.81; 'bare': 0.84; 'rusi': 0.91; 'to:none': 0.92; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=K2V2x5Kd9CMkQzj8iiGtWU/GoPuwDKUHnOga0ftsKYs=; b=dIegYywxGWZkicpAWQ4TAdd8M7+RKO2vxO9ekblWmWm2npcpiiNgIaluL5aI4A27Qh Is66LEB+VdZuVRswRoheuB1VsnpoWeMqJqZS1qGKGIKY2DewaqhzPgkJnNrIJ8M9DVfA hT5oGCRI0YJ9UZUw9YZxhqxTcgSBLzQQ6+/VcG1/zMh1bhYRXYEnPUS+TMcd3Fyxf/5R t+qtZZqdIjUhzWNKugjagmU6UEgtprZW2dW/VYfK1g3XYif4uV4ppAgqcFFCywKiQ/0d 7p/2Mo3UBzG9v4epjWjTVCUY9hnvlhlceuqb76zy2uBHkD4lF8OhsNA7cOqU9qSnSnj7 079A==
MIME-Version 1.0
X-Received by 10.68.228.97 with SMTP id sh1mr2982725pbc.50.1386780352118; Wed, 11 Dec 2013 08:45:52 -0800 (PST)
In-Reply-To <a34ada67-aa04-4f4d-b26d-e941cee03c4c@googlegroups.com>
References <CAHVvXxS23g8dxO23pPTmXLo0z=QzJY_CjwMUtJcvAVfRhZa8bA@mail.gmail.com> <201312090824.25211.gheskett@wdtv.com> <52A78F6F.3060507@stoneleaf.us> <CABicbJKoN9fV48yskd5wqE79vsb5=nPGfwgOTCO+fCFMG7g8qw@mail.gmail.com> <CAPTjJmpQ9bFP66j3p-PDb2Mp88GKWKktrcFRCWQtdo6fb8LHmA@mail.gmail.com> <mailman.3908.1386777719.18130.python-list@python.org> <a34ada67-aa04-4f4d-b26d-e941cee03c4c@googlegroups.com>
Date Thu, 12 Dec 2013 03:45:51 +1100
Subject Re: Experiences/guidance on teaching Python as a first programming language
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3915.1386780355.18130.python-list@python.org> (permalink)
Lines 36
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1386780355 news.xs4all.nl 2865 [2001:888:2000:d::a6]:41031
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:61600

Show key headers only | View raw


On Thu, Dec 12, 2013 at 3:27 AM, rusi <rustompmody@gmail.com> wrote:
> However when we have an REPL language like python, one has the choice
> of teaching the hello-world program as:
>
> print ("Hello World")
>
> or just
>
> "Hello World"
>
> The second needs one more assumption than the first, viz that we are in the
> REPL, however on the whole it creates better habits in the kids.

How is the bare string creating better habits? The only time I've ever
been happy with bare strings having functionality[1] is in shell-like
languages (including REXX; the one time I built a REXX system in which
bare strings weren't executed as commands was a MUD, where command
handlers could use bare strings to send lines of text to the client,
and I wasn't happy with that - an explicit function would have been
better). I'd much rather teach a function that produces clean output
than depend on the REPL for Hello World. Now, depending on the REPL
for *expressions* is quite another thing.

>>> 1+2
3

That makes perfect sense! But it's using Python as a calculator, not
as a programming language. Python blurs the line a bit, but for
teaching programming, I'd use programming style even at the REPL:

>>> print("Hello, world!")
Hello, world!

ChrisA

[1] I don't have anything to footnote here, I just felt like having one.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Experiences/guidance on teaching Python as a first programming language bob gailer <bgailer@gmail.com> - 2013-12-11 11:01 -0500
  Re: Experiences/guidance on teaching Python as a first programming language rusi <rustompmody@gmail.com> - 2013-12-11 08:27 -0800
    Re: Experiences/guidance on teaching Python as a first programming language Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-12-11 16:36 +0000
    Re: Experiences/guidance on teaching Python as a first programming language Chris Angelico <rosuav@gmail.com> - 2013-12-12 03:45 +1100
    Re: Experiences/guidance on teaching Python as a first programming language Roy Smith <roy@panix.com> - 2013-12-11 20:42 -0500
      Re: Experiences/guidance on teaching Python as a first programming language Larry Martell <larry.martell@gmail.com> - 2013-12-11 21:07 -0500
        Re: Experiences/guidance on teaching Python as a first programming language Roy Smith <roy@panix.com> - 2013-12-11 21:31 -0500
      The increasing disempowerment of the computer user (was: Experiences/guidance on teaching Python as a first programming language) Ben Finney <ben+python@benfinney.id.au> - 2013-12-12 13:21 +1100
      Re: The increasing disempowerment of the computer user Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-12 02:35 +0000
      Re: The increasing disempowerment of the computer user Ben Finney <ben+python@benfinney.id.au> - 2013-12-12 13:35 +1100
        Re: The increasing disempowerment of the computer user Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-12-12 10:59 +0000
          Re: The increasing disempowerment of the computer user David Hutto <dwightdhutto@gmail.com> - 2013-12-14 00:44 -0500
      Re: Experiences/guidance on teaching Python as a first programming language rusi <rustompmody@gmail.com> - 2013-12-11 19:52 -0800
        Re: Experiences/guidance on teaching Python as a first programming language Chris Angelico <rosuav@gmail.com> - 2013-12-12 15:20 +1100
      Re: Experiences/guidance on teaching Python as a first programming language bob gailer <bgailer@gmail.com> - 2013-12-12 11:51 -0500
      Re: Experiences/guidance on teaching Python as a first programming language Larry Martell <larry.martell@gmail.com> - 2013-12-12 16:18 -0500
        Re: Experiences/guidance on teaching Python as a first programming language Frank Miles <fpm@u.washington.edu> - 2013-12-13 16:21 +0000

csiph-web