Re: [Edu-sig] Edu-sig Digest, Vol 167, Issue 15
On Jun 24, 2017 12:49, <edu-sig-request@python.org> wrote: Send Edu-sig mailing list submissions to edu-sig@python.org To subscribe or unsubscribe via the World Wide Web, visit https://mail.python.org/mailman/listinfo/edu-sig or, via email, send a message with subject or body 'help' to edu-sig-request@python.org You can reach the person managing the list at edu-sig-owner@python.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Edu-sig digest..." Today's Topics: 1. Re: Exhibit: Session 2 of 10, a Python training (kirby urner) 2. PyCharm Edu with Stepik (Jurgis Pralgauskis) 3. Re: PyCharm Edu with Stepik (Andrew Harrington) 4. Re: Exhibit: Session 2 of 10, a Python training (Carl Karsten) ---------------------------------------------------------------------- Message: 1 Date: Sat, 24 Jun 2017 09:04:52 -0700 From: kirby urner <kirby.urner@gmail.com> To: Carl Karsten <carl@nextdayvideo.com> Cc: "edu-sig@python.org" <edu-sig@python.org> Subject: Re: [Edu-sig] Exhibit: Session 2 of 10, a Python training Message-ID: <CAPJgG3RvpYwfeP3sM=mdefyg0+zyjdxqaO+Hgun5mqrtujpCLg@mail.gmail.com> Content-Type: text/plain; charset="utf-8" On Fri, Jun 23, 2017 at 6:32 PM, Carl Karsten <carl@nextdayvideo.com> wrote:
On Fri, Jun 23, 2017 at 3:12 AM, kirby urner <kirby.urner@gmail.com> wrote:
Looping with for more string formatting
Kerby, I am curious about the pedagogy of introducing two distinct concepts at the same time like that. Care to elaborate?
I introduce string formatting with {placeholders} early in the training, and then keep using that. I also use the keywords list (keyword.kwlist) for raw material, when introducing for loops. So something like this: from keyword import kwlist for word in kwlist: if word.islower(): # showing how conditionals work print("Lowercase keyword: | {:20} |".format(word)) The format method is a good stand-in for callables in general in that we can start looking at positional versus named arguments, * and ** as argument exploders etc. So yeah, my technique is to keep introducing new concepts (e.g. for loop) while continuing to use those looked at so far (e.g. print formatting). Kind of like a juggling act, where one keeps introducing more balls. Kirby Kirby
participants (1)
-
Harry Riley